-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, there's no way for plugins to clean themselves up when they're no longer in use/relevant. This wasn't a problem previously, as plugins were entirely reactionary. But Barks have the option to call themselves with an interval, and when the underlying object is detached to be cleaned up, this interval both keeps it loaded, and keeps trying to run.
At the moment, a try {} catch block eats the error, but it doesn't get rid of the interval, so each time a reconnect happens, you get an extra orphaned bark timer for each bark that was active at the time.
I need to add functionality for plugins to tear down active timers, and to activate that on a disconnect. JavaScript doesn't have a dispose() type method, it seems, so I'm going to have to take care of this myself.