Skip to content

Pet class holds reference to removed ActiveMob's (Memory leaky) #53

@Mykindos

Description

@Mykindos

Noticed this when debugging why unloaded worlds were remaining in memory

Image

Tried everything possible to unregister, despawn pets on world unload but was having no luck.
I fixed this by making ActiveMob a weak reference, but you should also be able to fix this by nullifying activeMob when it is removed (this is currently not possible via API, setActiveMob(null) will just call despawn instead.

Paper Version: 1.21.4
Mythic, ModelEngine & MCPets version: latest dev builds

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions