• 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: retain variables between classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retain variables between classes


  • Subject: Re: retain variables between classes
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 16 Dec 2003 12:17:18 -0800

On Dec 16, 2003, at 11:06 AM, Matt Gillette wrote:

I think copy will be your answer, but you should look at the documentation to see how it works.
[array autorelease] //I'm not sure about this part
array = [inArray copy]; //Copy automatically retains I think, so no need to retain

The semantics of release/autorelese and copy, and accessor methods, are well-documented -- see various articles listed in:
<http://www.alastairs-place.net/cocoa/faq.txt>

If the array is supposed to be mutable, then you should use:
array = [inArray mutableCopy];

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.

References: 
 >retain variables between classes (From: "Jay Rimalrick" <email@hidden>)
 >Re: retain variables between classes (From: Matt Gillette <email@hidden>)

  • Prev by Date: Re: Changing the Locale for a single App?
  • Next by Date: RE: retain variables between classes
  • Previous by thread: Re: retain variables between classes
  • Next by thread: RE: retain variables between classes
  • Index(es):
    • Date
    • Thread