Objective C:Object Deallocated while key value observers were still registered with it

后端 未结 2 437
南旧
南旧 2020-12-28 17:36

I am hitting the below error after I added 2 additional fields to my core data model.

CarPark_CarPark_ was deallocated while key value observers were still r         


        
2条回答
  •  北海茫月
    2020-12-28 18:25

    To set the breakpoint open the breakpoints tab in Xcode 4 (Breakpoints window in Xcode 3) and add a new symbolic Breakpoint for the symbol "NSKVODeallocateBreak"

    Use the debugger console to print the observer at the adress given in the observation info

    Observer: 0x19af20

    po 0x19af20
    

    This should give some valuable information about the observer. Override addObserver:forKeyPath:options:context: in your custom CarPark class and set a breakpoint to see the exact location of the observing being established.

提交回复
热议问题