Re: Delayed Autorelease
Re: Delayed Autorelease
- Subject: Re: Delayed Autorelease
- From: Dru Satori <email@hidden>
- Date: Thu, 8 Apr 2010 11:20:30 -0400
This is a really common problem for developers coming from other platforms. In the Windows world the only thing really analogous to retain/release is the COM addref concepts, and even those lack the equivalent of autorelease.
The short version, in my experience, is when in doubt, manage the memory with retain and release pairs. Garbage collection is good, but can have unexpected behaviors that become tricky to debug. I know there are people that idol disagree, but between apple's leak finding tools, llvm's analysis tools and shark, it is often easier to hunt down a leak using old school retain/release methods than new school garbage collection.
Sent from my iPad
On Apr 8, 2010, at 11:09 AM, Steve Bird <email@hidden> wrote:
>
> On Apr 8, 2010, at 10:36 AM, Patrick M. Rutkowski wrote:
>
>> Is it common in either Cocoa or UIKit to have an autorelease run
>> happen only when the user does something?
>>
>> I'm in a situation where I believe the autorelease run is happening
>> only when I push a bush or otherwise fiddled with a UI item; might
>> that be the case, or am I confused?
>
> I don't know about pushing bushes, but in general the "autorelease run" is at the end of an event loop, when your code has finished responding to an event, and the system is about ready to look for another one.
>
>> Is there perhaps a way to have it logged to the console whenever an
>> autorelease run happens?
>
> --- A log to the console on every event would swamp you in data, I think.
>
> ----------------------------------------------------------------
> Steve Bird
> Culverson Software - Elegant software that is a pleasure to use.
> www.Culverson.com (toll free) 1-877-676-8175
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden