Also, you can always use programs for catching memory leaks. VLD is popular now.