Cancel plugin onScoreStateChanged function
In MS3, once this function is defined it continues to run even when the plugin is closed. I checked this by using a global property var initialsed to 0 and then incrementing each time the function executes, outputting the value to console.log.
After starting and stopping the plugin 4 times and checking the debug log, there were 4 separate instances of the global variable!
How do I cancel onScoreStateChanged on closing the plugin?
Comments
I'd like to know too. My workaround is adding a piece of hidden information to each opened score file and use them to invalidate all but the last onScoreStateChanged
https://musescore.org/en/node/320673#s43
In reply to I'd like to know too. My… by msfp
I haven't found any better solution unless this could be a use case for the infamous Qt.Quit()?