[Top][All Lists]

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

NSDebug.m: Small extension for allocation debugging (resended)

From: Roland Schwingel
Subject: NSDebug.m: Small extension for allocation debugging (resended)
Date: Wed, 08 Oct 2003 16:53:37 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624


A while ago I posted a patch to NSDebug for allowing to have own functions allocation counting allowing one to write an own ObjectAlloc. It appears that it might got lost or whatever, because I heard never again something about it, so here it is again, updated to match current code of NSDebug.

This patch hangs around for quite a while now adding a new function to NSDebug.m allowing to set own functioncallbacks permitting to write own debugallocation code for tracking down memleaks... It is especially useful when working on windows when using gnustep als dll, where you have no other chance to set own functions (except you would do really ugly things)...

This patch supplies a new function (taken from .m file):
* This functions allows to set own function backcalls for debugging allocation
* of objects. Useful if you intend to write your own objectalloc.
GSSetDebugAllocationFunctions(void (*newAddObjectFunc)(Class c, id o),void (*newRemoveObjectFunc)(Class c, id o))

So whenever an object is allocated or deallocated these supplied functions get called instead of the default onces. If you supply NULL for both parameters the default GNUstep functions for this task are enabled again... This is well tested and runs for quite a while now here...


Attachment: NSDebug_addon.tar.gz
Description: GNU Zip compressed data

reply via email to

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