discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GNUstep and valgrind


From: Andreas Fink
Subject: Re: GNUstep and valgrind
Date: Tue, 20 Mar 2018 08:33:59 +0100


> On 20 Mar 2018, at 08:22, H. Nikolaus Schaller <hns@goldelico.com> wrote:
> 
> 
>> Am 20.03.2018 um 08:11 schrieb Andreas Fink <afink@list.fink.org>:
>> 
>> 
>> You never call "release" on a autorelease pool.
> 
> Not "never": 
> https://developer.apple.com/documentation/foundation/nsautoreleasepool
> 
> Using drain over release is a "should" not a "must".



Well if you use garbage collection drain is not the same as release. Using 
garbage collection however is highly depreciated. Every OS X app sample code or 
other source I have seen always uses drain. You might be right that drain is 
the same as release in some cases however. Calling drain is the recommended 
action. How GnuStep has implemented drain vs. release I would have to check. 
But if you follow the Apple documentation, the GnuStep implementation should 
follow along (with a few exceptions which are not implemented [yet]). So 
calling drain would be a safe bet.





reply via email to

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