Re: -retain and -release Questions
Re: -retain and -release Questions
- Subject: Re: -retain and -release Questions
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 6 Mar 2004 23:40:37 -0800
On Mar 6, 2004, at 11:20 PM, Jerry Krinock wrote:
Generally, if I create (-alloc and -init) an object for temporary use
only
within one method, I believe I need to -release this object before the
method returns. This is in contrast to C++, where objects are
automatically
deleted when they go out of scope. Is this correct?
(Or -copy) yes.
Am I correct in saying that the only bad effect of omitting a -release
or
-autorelease message is that it causes a memory leak?
Yes.
Is there a tool to check my Obj-C/Cocoa app for such memory leaks?
See /Developer/Applications/Performance Tools
See also:
<
http://www.alastairs-place.net/cocoa/faq.txt>
references for articles about memory management.
mmalc
_______________________________________________
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.