Stefan Tilkov's Random Stuff

Java's "new" considered harmful

Interesting DDJ article on memory allocation and object instantiation in Java. One claim I believe to be incorrect:

How do other programming languages handle object creation? C++ is just like Java, as you would expect.

It’s been a while since I programmed C++ in earnest, but at least with regards to memory allocation, placement new is certainly more powerful (and complicated and error prone) than what you have available in Java.

Comments