I use this type of implementation for this: http://www.flipcode.com/archives/How_To_Find_Memory_Leaks.shtml
Doesn't work on malloc etc.
It will make your code really slow, but the awesome thing is.. you can add some extra functionality:
-Record when the memory block was allocated.
-Reset you memory-track-table
-Output the table when you like to a file