E.g. If foo has a property theModel and you added the controller as an observer to foo with the key path "theModel. MyValue".
Up vote 0 down vote favorite share g+ share fb share tw.
When my application is closed, the main controller class removes itself as Observer from the model and then releases the model. Like this: - (void)dealloc { theModel removeObserver:self forKeyPath:@"myValue"; theModel release; super dealloc; } And right after that, the debugger says: 2010-04-29 14:07:40.294 MyProgram13678:a0f An instance 0x116f2e880 of class TheModel was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object.
Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info: ( Context: 0x0, Property: 0x116f80430> ) where 0x116f2e880 is indeed the model and 0x116f40ec0 is indeed the controller. How can the controller still be an observer when it just removed itself as an observer?
Objective-c cocoa debugging key-value-observing link|improve this question edited Jul 19 '10 at 6:08Chris Hanson21.4k44072 asked Apr 29 '10 at 18:25BastiBechtold2,0611543 95% accept rate.
1 GDB is not saying that; that's your program's Console output. GDB output wouldn't have the timestamp, program name, PID, and thread ID on it. The output is coming from KVO itself, within your process.
I've corrected the question title accordingly. – Peter Hosey May 1 '10 at 19:37.
E.g. If foo has a property theModel and you added the controller as an observer to foo with the key path "theModel. MyValue".
Could you put a breakpoint on -addObserver:forKeyPath:options:context: and see what gets added and when?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.