Re: Help: How do you start debugging this crashlog?
Re: Help: How do you start debugging this crashlog?
- Subject: Re: Help: How do you start debugging this crashlog?
- From: "Steven M.Palm" <email@hidden>
- Date: Sun, 20 Jul 2003 17:57:41 -0500
On Sunday, July 20, 2003, at 05:23 PM, Alastair J.Houghton wrote:
No, you think right. You only need to release or autorelease when you
have allocated, copied or retained an object. If you obtain an object
from any method that does not contain the words "alloc" or "copy" in
its name, then that object has already been autoreleased and does not
need to be released again unless you retain it. Conversely, an object
obtained from such a method needs to be retained if you expect it to
persist outside of the current event (i.e. you should regard it as
destroyed the moment the processor returns to the framework).
So, something like:
myString = [[NSMutableString alloc]
initWithContentsOfFile:@"someFile.txt"];
Does this need to be specifically retained? Does it need a
release/autorelease?
You are right, I'm sure I'm thinking too much about this. I just
thought I had it, and now and questioning even the most basic things I
thought I had figured out. {sigh} Oh well, it will eventually come.
-----------------------
- Steven M. Palm
- Ham Radio Call: N9YTY
- Attempts to make thine own star shine shall lead thee into darkness.
-----------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.