discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSZombie??


From: Jonathan B. Leffert
Subject: Re: NSZombie??
Date: Tue, 26 Mar 2002 22:42:44 -0800
User-agent: Mutt/1.2i

On Wed, Mar 27, 2002 at 06:09:26AM +0000, Richard Frith-Macdonald wrote:

> On Tuesday, March 26, 2002, at 10:39 PM, Jonathan B. Leffert wrote:
> 
> > Does the GNUstep runtime support NSZombies?  I can't find any 
> > references to
> > it in Foundation/NSDebug.h or in the source to NSObject.
> 
> No ... it sets the isa pointer to 0xdeadface so any attempt to send 
> messages to
> the deallocated object (before it is reused) will cause  crash, and the 
> reason
> for the crash is obvious when you look at the object in the debugger.

Actually, I don't believe it causes a crash for access.  It does set the isa
pointer to some other location which has -release implemented to log an
error.

> I do occasionally think about implementing NSZombie ... but it offers 
> very
> little improvement over the existing mechanism, and is not an official 
> part of
> the OpenStep or MacOS-X APIs, so I've never got round to it.

Well, I personally find it fairly usefull to debug a certain set of memory
problems.  So, for me, it would be nice.

Jonathan



reply via email to

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