Skip to content

[Bug] Potential memory leak issue #546

@jhqwqmc

Description

@jhqwqmc

Pre-Issue Checklist

  • I have checked that I am on the latest version of Terra.
  • I have searched the github issue tracker for similar issues, including
    closed ones.
  • I have made sure that this is not a bug with another mod or plugin, and it
    is Terra that is causing the issue.
  • I have checked that this is an issue with Terra and not an issue with the
    pack I am using.
  • I have attached a copy of the latest.log file
  • I have filled out and provided all the appropriate information.

Environment

Name Value
Terra Version 6.6.6-BETA+451683aff
Platform / Platform Version Paper
Any External Plugins or Mods Terra spark
Terra Packs In Use None
Terra Addons In Use None

Issue Description

Frequently loading and unloading different worlds

Steps to reproduce

  1. Load a world that has not been loaded before
  2. Unload the world
  3. Repeat steps 1 to 2

Expected behavior

World objects can be normally reclaimed.

Actual behavior

private static final Set<World> INJECTED = new HashSet<>();

The world is added to this Set during initialisation and remains there after unloading, preventing its removal and thus hindering its reclaiming.

Full stacktrace

None

Additional details

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: PendingIssue/PR is currently awaiting approval by a moderator.Type: BugSomething isn't working as intended.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions