If I use a category which uses objc_setAssociatedObject to add pseudo-properties to an object, how can I make sure they get released properly? Do I have to release them manually in dealloc ?
If I use a category which uses objc_setAssociatedObject to add pseudo-properties to an object,
Share
The behavior you assign determines how the memory is managed for the type. If you choose retain or copy the object will be released when the instance of the class you add the associated reference to is deallocated. That makes retain and copy behavior operations preferred for Objective-C classes. Assign is also useful to avoid retain cycles as long as you set the reference to nil when done with the object.