Re: Not Sure of Memory Leak with ** ?
Re: Not Sure of Memory Leak with ** ?
- Subject: Re: Not Sure of Memory Leak with ** ?
- From: Jim Correia <email@hidden>
- Date: Sat, 20 Nov 2004 10:23:44 -0500
On Nov 20, 2004, at 6:46 AM, Craig Bakalian wrote:
How does one release, retain, copy, when using a point to a pointer in
Foundation and Objective C?
The object ownership rules in Cocoa state that if you didn't alloc,
copy or retain the object, you aren't responsible for releasing it. If
you follow those same rules for your own code, you won't have to have
special case rules.
in isWordInQuestion:location:
*location = [[s copy] autorelease];
and now findThisWord: is no longer responsible for releasing the object
(since it didn't directly create it.)
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden