• 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: Copy and release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy and release


  • Subject: Re: Copy and release
  • From: Scott Stevenson <email@hidden>
  • Date: Thu, 21 Oct 2004 14:45:19 -0700


On Oct 21, 2004, at 1:49 PM, Ricky Sharp wrote:

(2) Because data is immutable, there's a chance to share references. I'll mention strings again as an example. Two immutable strings that contain the same exact data could be stored such that only one copy of the data exists

I ran some tests a while back. On at least certain types of immutable foundation objects, -copy just returns a the same object with retainCount + 1.

In other words, it's not theoretical (since Evan was asking for hard data).

- Scott



--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
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: 
 >Copy and release (From: Nicko van Someren <email@hidden>)
 >Re: Copy and release (From: Evan Schoenberg <email@hidden>)
 >Re: Copy and release (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Bug in NSArrayController? (immutable instead of mutable dictionaries)
  • Next by Date: performance of adding subviews
  • Previous by thread: Re: Copy and release
  • Next by thread: Re: Copy and release
  • Index(es):
    • Date
    • Thread