News for hackers. Stuff that matters.
Re:C++ in Coders at Work by dkarl on Friday October 16, 2009 @03:21PM (#885999)
exceptions are almost always going to cause leaks without the team being all C++ experts

Don't give up exceptions; give up naked pointers. Use shared_ptr and scoped_ptr, and you won't have memory leaks due to exceptions. Use RAII consistently, and you'll find it's actually easier to handle resource management in C++ than in Java. Java's resource management is superior for memory but inferior for every other resource.

There are no comments on this comment yet.