I'm debugging the NSSound stuff and have run into a bit of a problem with memory management and the whole RETAIN/RELEASE stuff... I'm sure my probably has do to with being a novice.
Anyway, in the -dealloc method of NSSound I call RELEASE(_data) and right after it [nameDict removeObjectForKey: _name]. The dictionary nameDict contains as a key the sound name and as a value the NSSound object associated with it. Well, whenever this method is called it will go ahead and call NSSound's -dealloc again which in turn sends another call out to RELEASE(_data). As you can imagine it blows up at this point.
So my question is: Would adding a RETAIN(self) just before the call to [nameDict removeObjectForKey: _name] solve this issue? Anything else? This seems to do the trick, but I'm wondering if it's correct.