atom / flight-manual.atom.io

📖 Documentation for Atom, generated by nanoc, hosted by GitHub Pages
https://flight-manual.atom.io
Other
640 stars 1.54k forks source link

Deactivation advice is incorrect #508

Closed winstliu closed 5 years ago

winstliu commented 5 years ago

The current advice on deactivation in the word-count page reads as follows:

This optional method is called when the window is shutting down. If your package is watching any files or holding external resources in any other way, release them here. If you're just subscribing to things on window, you don't need to worry because that's getting torn down anyway.`

This advice is incorrect, as deactivation also occurs when the package is disabled, which can happen independently of window shutdown. You should in fact dispose of all subscriptions you're holding on to.