mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
13de0e2a12
commit
8c89a86607
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue