Currently starsector has two methods to inform for a possible campaign engine memory leak.
1. A popup that warns about multiple campaign engines existing, while also telling the user to save and restart to prevent possible crashes.
2. A devmode exclusive message in the bottom left that mentions multiple campaign engines existing, only stopping if the amount of campaign engine instances goes back to 1.
I think the second method is quite useful as a mod developer.
It helped me track down two memory leaks in one of my own and in another mod before. Its faster than using visualvm for initial debugging and you are more likely to notice it, as most modders probably dont check on their game with visualvm daily.
However, in my opinion the first method is often less useful, and is often just wrong about its assesment.
It often seems to false trigger after reloading a save, which becomes more likely with the more mods you have, even if none of them actualy do have a memory leak. It seems that even if forced to, the garbage collector just occasionaly fails to get rid of the old CampaignEngine immediately even without a leak present.
My personal issue with it is that it informs the user of a possible leak, but unlike the second method, it never tells them that it may have been a false assesment in case there is only one engine again.
This often leads to confusion and misinformation among users, you can frequently see cases where someone installs a new mod, they get the pop up and they link the issue towards one of the mods they just downloaded, which in turn causes concerns for that mods author and the users.
Another issue with those false flags is that it conditions people to simply clicking it away, it happens so often that people just ignore the warning entirely.
I dont have many solutions to the issue myself, but i think there should be a bit longer of a buffer between reloading a save and the message being able to appear. Instead of a pop up, i think it would also do better if it was a warning in some corner of the screen, which keeps the user updated in case it is actually a false flag, similar to the current devmode warning.
But after discussions on the discord ive seen people have differing opinions on solutions too, so im sure there will be more in the replies.