yandexmobile/yandexmapkit-ios — pull request #6 by eploko (2012-02-01 15:04:38+00:00)
Title: Fix: An instance 0x685f030 of class LocationFetcher was deallocated while key value observers were still registered with it.

An instance 0x685f030 of class LocationFetcher 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: 0x6e44650>
)

The OnScreenButtonsViewController was observing its locationFetcher's fetchingLocation property and was zeroing out the reference to the locationFetcher in its dealloc method before removing the observer.

Changed the order of the calls to make the warning go away. All's now nice and dandy. :)