I’m writing a plugin that needs to do some cleanup when Obsidian is closed by the user. I thought onunload would do the trick, but apparently it is not called when Obsidian is closed?
Is there any event or hook my plugin can subscribe to for cleaning up before Obsidian is closed?
If it does not run entirely, is it because of some particular exit scenario, like task manager kill?
Or won’t it necessarily be run even if the user simply closes the Obsidian window normally? In this last case would there be more chances to run completely?