Re: Copy and release
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