Dealloc notification stuff

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5524 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-12-15 17:31:01 +00:00
parent 5837aeb214
commit c06187dbf2
3 changed files with 41 additions and 3 deletions

View file

@ -661,6 +661,23 @@ static BOOL double_release_check_enabled = NO;
NSDeallocateObject (self);
}
static BOOL deallocNotifications = NO;
- (BOOL) deallocNotificationsActive
{
return deallocNotifications;
}
- (void) setDeallocNotificationsActive: (BOOL)flag
{
deallocNotifications = flag;
}
- (BOOL) _dealloc
{
return YES;
}
- free
{
[NSException raise: NSGenericException
@ -1029,7 +1046,12 @@ static BOOL double_release_check_enabled = NO;
}
if (NSDecrementExtraRefCountWasZero(self))
[self dealloc];
{
if (deallocNotifications == NO || [self _dealloc] == YES)
{
[self dealloc];
}
}
#endif
}