as long as there are no issues calling clear() extra times, we could get in the habit of clearing before adding during dev...jps wrote:it's not ideal wrt module reloading.
I'd think you would just add all callbacks under a key for your plugin. I can't think of a huge use case where you'd be clearing/adding multiple different callbacks in the middle of your plugin. even so, you could just prefix with plugin and clear a list on reloadsublimator wrote:If you use more than one callback you'd use a different key wouldn't you?
I think when I do the module dev plugin I might be able to hook api calls and do stuff like automatically clear regions and callbacks on reload