KSPLeakReducer is a small KSP 1 mod that reduces stock event callback memory leaks during scene changes, editor use, vessel unloading, and other teardown paths.
It is designed to work alongside KSPCommunityFixes. KSPCommunityFixes detects and cleans many leaks after they occur; KSPLeakReducer tries to prevent selected stock callbacks from being left behind in the first place.
Download the zip and extract it. Copy the KSPLeakReducer folder into your KSP GameData directory.
GameData/
000_Harmony/
0Harmony.dll
KSPLeakReducer/
KSPLeakReducer.cfg
KSPLeakReducer.version
Plugins/
KSPLeakReducer.dll
After starting KSP, KSP.log should contain:
[KSPLeakReducer] Harmony patches applied
If you see that line, the mod loaded correctly.
GameData/KSPLeakReducer/KSPLeakReducer.cfg contains:
KSPLEAKREDUCER
{
VerboseDebugLogging = true
}
Set VerboseDebugLogging to false to reduce log output. Cleanup still runs normally when disabled.
KSPLeakReducer targets KSP 1.12.x and requires Harmony 2. It complements KSPCommunityFixes rather than replacing it — KSPLeakReducer prevents selected callbacks from being stranded, while KSPCommunityFixes handles detection and cleanup of what remains.
No gameplay or content mods are required. A small number of optional compatibility fixes are included for known mod interactions, but only activate when the relevant mod is present.
KSPLeakReducer does not attempt broad third-party leak cleanup. Its scope is stock KSP and Breaking Ground lifecycle behavior.
After starting KSP, check that KSP.log contains:
[KSPLeakReducer] Harmony patches applied
If the line is missing, confirm Harmony 2 and KSPLeakReducer are installed correctly and check the surrounding log entries for a patching exception.
Cleanup messages only appear when callbacks are actually removed, so they may not show every session:
[KSPLeakReducer] Removed N destroyed callback owners
[KSPLeakReducer] Scene-unload removed N destroyed callback owners
Verbose log entries begin with:
[KSPLeakReducer:Debug]
Licensed under the GNU General Public License v3.0.
Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.