mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
(NSDeallocateObject): Set anObject->class_pointer to 0xdeadface, to
help catch message-sends to deallocated objects. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@280 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f43c5d34f7
commit
3c9d54ece4
1 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,9 @@
|
|||
void NSDeallocateObject(NSObject *anObject)
|
||||
{
|
||||
if ((anObject!=nil) && CLS_ISCLASS(((id)anObject)->class_pointer))
|
||||
NSZoneFree ([anObject zone], anObject);
|
||||
{
|
||||
((id)anObject)->class_pointer = (void*) 0xdeadface;
|
||||
NSZoneFree ([anObject zone], anObject);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue