On 25 May 2006, at 15:18, Richard Stahl wrote:
Hi,
What is the general strategy for debugging memory leaks and heap
corruption in applications using GNUStep? Are there any tools
available like ObjectAlloc and MallocDebug for MacOS X?
No external tools I know of but ...
The base library provides a set of functions (in NSDebug.[hm]) for
monitoring allocation of objects ... see http://www.gnustep.org/
resources/documentation/Developer/Base/Reference/
Functions.html#function$GSDebugAllocationActive
All applications provide a panel which uses those functions to provide
a nice display of memory allocation information ... just click on the
icon in the 'info' panel to get the 'memory Panel'
You can use NSZombie to track deallocated objects ... see the
documentation for the NSDeallocateZombies and NSZombiesEnabled
enviropnment variables at
http://www.gnustep.org/resources/documentation/Developer/Base/
Reference/index.html
You can call [NSObject enableDoubleReleaseCheck: YES] ... see http://
www.gnustep.org/resources/documentation/Developer/Base/Reference/
NSObject.html#method$NSObject(GNUstep)+enableDoubleReleaseCheck$