Re: Release vs. autorelease

2009-01-12 Thread I. Savant
On Mon, Jan 12, 2009 at 4:43 PM, Mohan Parthasarathy wrote: > I assumed that the reference count reached > zero which is what you are hinting at i guess.. Bad assumption. :-) More precisely, a dangerous one. You've no idea (because it's not your job to in a Cocoa program) what else may be ret

Re: Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
Hi, Sorry for the incorrect wording. I assumed that the reference count reached zero which is what you are hinting at i guess.. thanks mohan On Mon, Jan 12, 2009 at 12:47 PM, Andy Lee wrote: > On Jan 12, 2009, at 2:37 PM, Mohan Parthasarathy wrote: > >> In places other than dealloc where memo

Re: Release vs. autorelease

2009-01-12 Thread Scott Ribe
> When i have more than one pool, where > does the auto-released memory lands in ? The most recently created pool. >What am i missing ? Sometimes you want to create your own pool so that you can periodically free up memory *during* some long batch processing, rather than waiting for the framewor

Re: Release vs. autorelease

2009-01-12 Thread I. Savant
On Mon, Jan 12, 2009 at 3:18 PM, Mohan Parthasarathy wrote: > I looked at the program in the link. When i have more than one pool, where > does the auto-released memory lands in ? ... > Is there any point in having more than pool ? Have you read the documentation as suggested? It spells this o

Re: Release vs. autorelease

2009-01-12 Thread Andy Lee
On Jan 12, 2009, at 2:37 PM, Mohan Parthasarathy wrote: In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? I can see that the memory is releas

Re: Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
Thanks for all the responses. I understand the difference slightly better now. I looked at the program in the link. When i have more than one pool, where does the auto-released memory lands in ? Is there any point in having more than pool ? I am assuming that it is just a linear list and draining

Re: Release vs. autorelease

2009-01-12 Thread I. Savant
On Mon, Jan 12, 2009 at 2:53 PM, Robert Marini wrote: > Autoreleased objects have the trigger of a release delayed until the > autorelease pool is "drained." ... which may or may not be at the end of the current run loop. There are a lot of "ifs" to consider, which are explained in the documen

Re: Release vs. autorelease

2009-01-12 Thread Nick Zitzmann
On Jan 12, 2009, at 12:37 PM, Mohan Parthasarathy wrote: In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? Yes, but only if you're creating

Re: Release vs. autorelease

2009-01-12 Thread Dave Carrigan
On Jan 12, 2009, at 11:37 AM, Mohan Parthasarathy wrote: In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? I can see that the memory is rel

Re: Release vs. autorelease

2009-01-12 Thread Jean-Daniel Dupas
Le 12 janv. 09 à 20:37, Mohan Parthasarathy a écrit : Hi, In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? I can see that the memory is r

Re: Release vs. autorelease

2009-01-12 Thread Robert Marini
The memory management guides go into great detail on this subject. Autoreleased objects have the trigger of a release delayed until the autorelease pool is "drained." By explicitly releasing an object, you are surrendering ownership of that object and, really, is there a good reason to kee

Release vs. autorelease

2009-01-12 Thread Mohan Parthasarathy
Hi, In places other than dealloc where memory needs to be released (e.g, reassigning pointer to objects), is there a difference in doing autorelease or release of the object in terms of perfomance etc. ? I can see that the memory is released immediately in one case whereas in the other it is slig