Displays Wifi Signal Strength and Speed on the panel
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
It's required for you to cleanup all signal, objects and GSources in `disable()`. As a result of `_updateText()` calling `_resetTimeout()`, the GSource will be recreated indefinitely. Because the GSource you create with `Mainloop.timout_add_seconds()` holds a reference to the instance of `WifiSignalMonitor` via the `_updateText()` closure, which in turn holds a reference to `WifiSignalMonitor`, you have created a cyclic reference that is never broken. Each time `disable()` and `enable()` are called you are creating a new instance of `WifiSignalMonitor` which can not be collected by the JavaScript engine. To fix this, your `disable()` function should look more like: function disable () { Main.panel._rightBox.remove_child(wifiMonitor); Mainloop.source_remove(wifiMonitor._timeout); wifiMonitor.destroy() wifiMonitor = null; }
Well spotted. I didn't think of that before. How do I proceed now? Do I just submit another version of my extension? May I still use version number 4?
Yup, you'll have to upload a new zip as v5
May I close this old review somehow?