mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
ed75845ce7
commit
68f58ffe56
1 changed files with 5 additions and 1 deletions
|
@ -1419,8 +1419,12 @@ static id gs_weak_load(id obj)
|
||||||
|
|
||||||
- (void) finalize
|
- (void) finalize
|
||||||
{
|
{
|
||||||
Class destructorClass = object_getClass(self);
|
Class destructorClass = Nil;
|
||||||
IMP destructor = 0;
|
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
|
/* 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
|
* creators, so start at the leaf class and then go up the tree until we
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue