Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy and release




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.