discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Memory Debug Strategy


From: Richard Stahl
Subject: Re: Memory Debug Strategy
Date: Thu, 25 May 2006 18:22:56 -0400
User-agent: Unison/1.7.2

On 2006-05-25 12:00:54 -0400, Richard Frith-Macdonald <address@hidden> said:

Thanks for all the information. My application is a server/daemon process with no UI so the info panel is not an option. However, I can certainly use your other suggestions.

Thanks,

Richard Stahl


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]