What are some tips I can use to avoid memory leaks in my applications? In my current project I use a tool \"INSURE++\" which finds the memory leak and generate the report. <
Smart pointers can be very helpful in automating the bookkeeping of object lifetimes:
http://ootips.org/yonat/4dev/smart-pointers.html
Where possible, use stack allocated objects inside of their relevant scopes instead of new/delete.
Tools like valgrind have some overhead and can slow down your runs. If you know your codebase and the kinds of leaks that tend to arise, you can target specific classes and implement lighter weight checks (even just a simple object count that you check against zero when you quit). These lightweight checks can then be used to motivate you into doing a more extensive valgrind debugging session when they are triggered.