Skip to content

Memory leak detected by KSPCF #24

@BrettRyland

Description

@BrettRyland

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions