In -finalize, we're pretending to be the Objective-C runtime, so we need to

actually use isa directly, rather than the safe version.  A better solution
would be to call object_dispose(), but this only works for objects created with
class_createInstance().



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33704 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-08-07 18:00:55 +00:00
parent 13de0e2a12
commit 8c89a86607

View file

@ -1419,8 +1419,12 @@ static id gs_weak_load(id obj)
- (void) finalize
{
Class destructorClass = object_getClass(self);
Class destructorClass = Nil;
IMP destructor = 0;
#ifdef OBJC_SMALL_OBJECT_MASK
if (((NSUInteger)self & OBJC_SMALL_OBJECT_MASK) == 0)
#endif
destructorClass = isa;
/* C++ destructors must be called in the opposite order to their
* creators, so start at the leaf class and then go up the tree until we