3 ms·
Which for KVO reasons is a really bad way of releasing objects when 'self' is being deallocated.
by ajg1977 15y ago
Which for KVO reasons is a really bad way of releasing objects when 'self' is being deallocated.
- Flow 15y agoHmm, I don't quite follow. I'm new to Cocoa programming and just followed the advice from the book Cocoa up and running.
- kstenerud 15y agoIf anyone does KVO on your object, they will be sent a "property changed" notification when you call self.myvar = nil in your dealloc method. It's quite likely that whoever gets notified of the property change will attempt to access your object, but now your object is in a half-destroyed state.