As someone else suggested why not just use
[lookup removeAllObjects]
or perhaps I am missing a part of the bigger picture for the project
you're working on.
Dale Merrick
On Dec 15, 2008, at 4:54 PM, John Michael Zorko wrote:
Hello, all ...
Imagine this:
static NSMutableDictionary
Le 16 déc. 08 à 05:56, Andy Lee a écrit :
On Dec 15, 2008, at 6:27 PM, John Michael Zorko wrote:
I'm not concerned about the contents per se -- i'm concerned about
releasing something I declared as static, just to create it again
later.
Creating and re-creating objects is in itself
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary. If
I call
[lookup release];
lookup = [NSMutableDictionary new];
... it will obviously be faster than coding a for loop and
On Dec 15, 2008, at 3:54 PM, John Michael Zorko wrote:
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary.
[lookup removeAllObjects];
is probably your best choice.
If I call
On Dec 15, 2008, at 4:54 PM, John Michael Zorko wrote:
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary.
If I call
[lookup release];
lookup = [NSMutableDictionary new];
... it
- Original Message
From: John Michael Zorko jmzo...@mac.com
To: cocoa-dev@lists.apple.com
Sent: Monday, December 15, 2008 2:54:46 PM
Subject: proper way to release a static NSMutableDictionary?
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup
Ashley,
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary.
If I call
[lookup release];
lookup = [NSMutableDictionary new];
... it will obviously be faster than coding a for loop and removing
On 15 Dec 08, at 14:54, John Michael Zorko wrote:
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary.
If I call
[lookup release];
lookup = [NSMutableDictionary new];
... it will obviously be
On 16 Dec 2008, at 10:27 am, John Michael Zorko wrote:
I'm not concerned about the contents per se -- i'm concerned about
releasing something I declared as static, just to create it again
later. Part of me is saying just release the dictionary's
contents, not the dictionary itself.
On Dec 15, 2008, at 5:33 PM, Andrew Farmer wrote:
On 15 Dec 08, at 14:54, John Michael Zorko wrote:
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary.
If I call
[lookup release];
lookup =
On Mon, Dec 15, 2008 at 5:54 PM, John Michael Zorko jmzo...@mac.com wrote:
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup = [NSMutableDictionary new];
... now imagine a situation where I need to clear that dictionary. If I
call
[lookup release];
lookup =
On Dec 15, 2008, at 6:27 PM, John Michael Zorko wrote:
I'm not concerned about the contents per se -- i'm concerned about
releasing something I declared as static, just to create it again
later.
Creating and re-creating objects is in itself nothing to be afraid
of. It happens all the
12 matches
Mail list logo