Is there any 'easy' way of having pure objective-c containers, such as NSMutableDictionary or CFMutableDictionary, that don't increment the reference count of added objects, without using the c++ standard library?
EDIT: Explanation - the reason I want this is so I can implement a kind of "Exactly One" pattern - a class will have a static getThing:(NSString*)name method. If that method finds a Thing associated with the name in some static datastructure (the non reference-counting dictionary), it returns it, otherwise it creates one, adds it to the structure under that name, and returns it. That Thing object can be retained by the client at will, but when its reference count falls to 0 (and dealloc is called), it should be removed from the dictionary. Thus, I can't release it when adding and retain it again when removing it - dealloc would get called again, and I don't want that. That's why I need the non incrementing dictionary. If there's another way to get what I want, please let me know, although I'm pretty sure that the checked answer gives me what I want. Thanks!