3 ms·
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
by dkarl 17y ago
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.