You can use the mm4 memory leacks tracing ability.
or you can use madExcept (http://www.madshi.net/madExceptDescription.htm).
There is an option "Report ressource leacks" that will print a very useful report when the application exits.
You can read more about it here: http://help.madshi.net/madExceptSettings1.htm