From ec34e901cb4e60ab3a9385258a45d77303685eb1 Mon Sep 17 00:00:00 2001 From: mccallum Date: Wed, 5 Apr 1995 16:05:51 +0000 Subject: [PATCH] (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 --- Source/NSDeallocateObject.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/NSDeallocateObject.m b/Source/NSDeallocateObject.m index 7630096d6..00ac7f054 100644 --- a/Source/NSDeallocateObject.m +++ b/Source/NSDeallocateObject.m @@ -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; }