Re: Calling -retain inside -dealloc
Re: Calling -retain inside -dealloc
- Subject: Re: Calling -retain inside -dealloc
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 27 Jun 2005 02:45:54 -0700
On Jun 27, 2005, at 12:15 AM, Andrew Garber wrote:
The problem isn't that my class is suffering performance-wise. This is
just an experiment to see how much of a performance increase can be
gained in this case by using an alternative to NSNotifications.
I'm afraid this still doesn't explain what the relevance is of memory
management, and in what respects this is an alternative to
notifications. If you want something that's likely to be higher
performance than bindings, you might try key-value observing.
Keeping references to instances in various class variables (like an
NSMutableArray) was the most elegant approach I could think of.
NSMutableArray's addObject, removeObject, and containsObject methods
are very convenient for what I'm trying to accomplish, so I would be
great I could use an NSMutableArray without having it mess with the
retain/release counts.
If you simply need to keep track of a collection of objects -- and in
particular if you need simply to determine whether or not the
collection contains a given object rather than maintain order -- then
an NSMutableSet would probably be faster...
mmalc
_______________________________________________
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