Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak detected by KSPCF #24

Open
BrettRyland opened this issue Aug 23, 2022 · 0 comments
Open

Memory leak detected by KSPCF #24

BrettRyland opened this issue Aug 23, 2022 · 0 comments

Comments

@BrettRyland
Copy link

The KSP Community Fixes mod detects a of memory leak in PRE that is easily fixable:

[KSPCF:MemoryLeaks] A destroyed PhysicsRangeExtender:PhysicsRangeExtender instance is owning a onVesselSituationChange GameEvents callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.

In OnDestroy in PhysicsRangeExtender.cs#L75

GameEvents.onVesselSituationChange.Add(SituationChangeFixes);

should be

GameEvents.onVesselSituationChange.Remove(SituationChangeFixes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant