• 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: Memory Managment (copys??)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Managment (copys??)


  • Subject: Re: Memory Managment (copys??)
  • From: Kevin Ballard <email@hidden>
  • Date: Sat, 5 Feb 2005 17:50:00 -0500

The reason why [object copy] isn't working is most likely because SOMEObject doesn't conform to the NSCopying protocol. If you look at the docs for -copy, it says NSObject doesn't conform to NSCopying and subclasses are responsible for implementing -copyWithZone: if you want to use -copy on them.

On Feb 5, 2005, at 4:52 PM, Will Mason wrote:

You're setting the same property on the same object ten times.
Therefore, it always comes out as the last value you set.

On Feb 5, 2005, at 4:38 PM, Coleman Nitroy wrote:

I tried doing:

[array addObeject: [object copy]];

And all I got was 10, 0's. I am baffled.

-- Kevin Ballard email@hidden http://www.tildesoft.com http://kevin.sb.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Re: Memory Managment (copys??) (From: Will Mason <email@hidden>)

  • Prev by Date: Re: Memory Managment (copys??)
  • Next by Date: Re: Memory Managment (copys??)
  • Previous by thread: Re: Memory Managment (copys??)
  • Next by thread: Re: Memory Managment (copys??)
  • Index(es):
    • Date
    • Thread