On Jun 29, 2008, at 9:42 AM, Mike Ferris wrote:
And, as long as we're on the topic... who can name the only other
exceptional case for the release only if you alloc,new, copy or
retain rule? (It's pretty old-school...)
How about if you're implementing an initializer for a class cluster
On Jun 28, 2008, at 9:59 PM, Charles Srstka wrote:
Methods that begin with alloc or new or contain copy will
return objects you are responsible for. All other objects returned
from methods are taken care of.
Well, there is the notable exception of top-level objects loaded
from a NIB
On Jun 29, 2008, at 1:58 AM, mmalc crawford wrote:
On Jun 28, 2008, at 9:59 PM, Charles Srstka wrote:
Methods that begin with alloc or new or contain copy will
return objects you are responsible for. All other objects returned
from methods are taken care of.
Well, there is the notable
On Jun 29, 2008, at 8:02 AM, Charles Srstka wrote:
Yes, but it's not obvious, which is why I thought to point it out
since we're discussing the times when you should and shouldn't
release objects. The alloc, init, and retain methods are also
documented, but that doesn't mean we can't help
Best thing to do about the top-level nib exception to the rule is to
use NSWindowController or NSViewController to do your nib loading.
These classes properly take responsibility for top-level objects of
the nibs they load and then all you have to do is manage the lifetime
of the
On Sat, Jun 28, 2008 at 5:25 PM, john muchow [EMAIL PROTECTED] wrote:
The last thread that I saw on this topic was dated sometime in
2004if there is something more recent that I didn't find, I
apologize up front...
I realize nothing has probably changed as far as the API and the
On Jun 28, 2008, at 5:25 PM, john muchow wrote:
The last thread that I saw on this topic was dated sometime in
2004if there is something more recent that I didn't find, I
apologize up front...
I realize nothing has probably changed as far as the API and the
documentation to indicate
Don't think about it.
If memory management confuses you in any way, don't try to think about
the status of objects returned from framework methods. Only worry
about it from the perspective of your code. Do you need the object to
stay around after your method returns? Then retain it, and remember
that return autoreleased objects?
On Sat, Jun 28, 2008 at 5:25 PM, john muchow [EMAIL PROTECTED] wrote:
The last thread that I saw on this topic was dated sometime in
2004if there is something more recent that I didn't find, I
apologize up front...
I realize nothing has probably changed as far
On Jun 28, 2008, at 7:43 PM, Markus Spoettl wrote:
Methods that begin with alloc or new or contain copy will
return objects you are responsible for. All other objects returned
from methods are taken care of.
Well, there is the notable exception of top-level objects loaded from
a NIB
10 matches
Mail list logo