Avoid use of NSDeallocateObject() as it dooesn't work properly with new runtime.

This commit is contained in:
rfm 2025-01-02 17:43:28 +00:00
parent ae8367e401
commit bc3d2508ee
4 changed files with 13 additions and 34 deletions

View file

@ -949,16 +949,12 @@ again:
* and try to use it while it is being deallocated.
*/
M_LOCK(messagePortLock);
if (NSDecrementExtraRefCountWasZero(self))
if (1 == [self retainCount])
{
NSMapRemove(ports, (void*)[self name]);
M_UNLOCK(messagePortLock);
[self dealloc];
}
else
{
M_UNLOCK(messagePortLock);
}
M_UNLOCK(messagePortLock);
[super release];
}
- (BOOL) sendBeforeDate: (NSDate*)when