• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Not Sure of Memory Leak with ** ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Not Sure of Memory Leak with ** ? (From: Craig Bakalian <email@hidden>)

  • Prev by Date: Pb implementing shared instance
  • Next by Date: WWDC DVD's ... playing on laptops.
  • Previous by thread: Not Sure of Memory Leak with ** ?
  • Next by thread: Pb implementing shared instance
  • Index(es):
    • Date
    • Thread