If I am adding an item to a dictionary like this:
[connectionHandlers setObject:projectsHandler forKey:[NSNumber numberWithInt:PROJECTS_CONNECTION_ID]];
Should I be retaining the NSNumber used for the key.
Also, when an object is added to an NSArray
or NSDictionary
, is it retained by the Array or Dictionary when added and released when removed?
I'm trying to get my head around Memory Management on the iPhone, and it's a doozy