discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Debug Strategy


From: Richard Frith-Macdonald
Subject: Re: Memory Debug Strategy
Date: Thu, 25 May 2006 17:00:54 +0100


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$




reply via email to

[Prev in Thread] Current Thread [Next in Thread]