bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSAutoreleasePool drain] works as documented, but is that what is want


From: Christopher James Elphinstone Chandler
Subject: -[NSAutoreleasePool drain] works as documented, but is that what is wanted?!
Date: Mon, 02 Nov 2009 13:25:14 -0500

Hi Folks,

I have been using GNUstep Foundation for a while as a portable platform base for Linux, Darwin and OS X/Darwin. It works very well - up until now, I haven't found a bug, and technically, I still haven't!

While tracking one of my own bugs I have just noticed that -[NSAutoreleasePool drain] is a no-op for non-Garbage Collected environments. This behaviour is documented at http://www.gnustep.org/resources/documentation/Developer/Base/Reference/index.html and it does indeed work as documented.

This is unfortunate as the Apple version of -[NSAutoreleasePool drain] calls [-NSAutoreleasePool release] for non-garbage collected environments, and is encouraged by Apple as an alternative to -[NSAutoreleasePool release] in all their example and other source code as it behaves correctly in Garbage Collected and non-Garbage Collected environments. Apple's and GNUstep's -[NSAutoreleasePool release] behave similarly - a no-op for Garbage Collected environments and release the NSAutoreleasePool in non-Garbage Collected environments.

May I humbly suggest that GNUstep's -[NSAutoreleasePool drain] is updated to behave exactly like Apple's - IE to call -[NSAutoreleasePool release] in non-Garbage Collected environments? This is easy to work around, but I expect that I won't be the first to fail to notice the difference! If this has come up before, and been voted down, I'll understand. But searching the archives for 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]