-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
WildBlueTools/ResourceRefinery/WBIRefinery.cs
Line 182 in 20258e1
| public void Destroy() |
I noticed this in someone's logs:
[LOG 07:36:19.411] [KSPCF:MemoryLeaks] A destroyed WildBlueTools:WBIPartDeprecator instance is owning a onLevelWasLoadedGUIReady callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
[LOG 07:36:19.411] [KSPCF:MemoryLeaks] A destroyed WildBlueTools:WBIRefineryAppButton instance is owning a onGUIApplicationLauncherReady callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
[LOG 07:36:19.411] [KSPCF:MemoryLeaks] A destroyed WildBlueTools:WBTAppButton instance is owning a onGUIApplicationLauncherReady callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
[LOG 07:36:19.412] [KSPCF:MemoryLeaks] A destroyed WildBlueTools:ModCategorizer instance is owning a onGUIEditorToolbarReady callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
[LOG 07:36:19.412] [KSPCF:MemoryLeaks] A destroyed WildBlueTools:WBIToolTipManager instance is owning a onEditorPartEvent callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
I was surprised to notice that this class does try to clean up its event handlers - but the method is named wrong so Unity isn't going to call this! It should be OnDestroy not Destroy.
Metadata
Metadata
Assignees
Labels
No labels