Unnecessary unregisterAsObserver

Bug #462120 reported by Andy Matuschak
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sparkle
Confirmed
Low
Unassigned

Bug Description

"It is -unregisterAsObserver that is causing the NSException.

Andy, many of us have a breakpoint set for NSException (and/or objc_exception_throw) in XCode. So every time we run the app and get to the point of the second nib instance it causes the breakpoint to fire and stop execution. This gets rather annoying after a while. :)

I solved this by adding a flag to SUUpdater called hasRegisteredObservers. I set it in -registerAsObserver and in -unregisterAsObserver if it is not set it returns.

No more unnecessary NSExceptions."

Hofman: "I wonder if it's not the -unregisterAsObserver in -[SUUpdater dealloc]. That's potentially dangerous and moreover totally unnecessary, because instances that did register as observer will never be deallocated (as they're retained by the sharedUpdaters dictionary), while instances that are deallocated are never initialized (and therefore never registered)."

Changed in sparkle:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 1.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.