juliarn / npc-lib

Asynchronous, high-performance Minecraft NPC library for 1.8-1.21 servers.
MIT License
296 stars 50 forks source link

Leaking Objects of type WrappedWatchableObject #91

Closed SplotyCode closed 1 year ago

SplotyCode commented 1 year ago

In MetadataModifier we append to metadata but dont remove old WrappedWatchableObject with the same index

derklaro commented 1 year ago

I don't understand the issue here

SplotyCode commented 1 year ago

We change metadata (in this case sneaking) in certain scenarios. Every time we do that a new instance is allocated that never gets released. This results in memory leaks

derklaro commented 1 year ago

In v2?

SplotyCode commented 1 year ago

In 2.7-SNAPSHOT

derklaro commented 1 year ago

I don't think anyone is still maintaining that version as we've focused on developing v3.

SplotyCode commented 1 year ago

Is 3.0 considered stable e.g. production ready? I see that the master branch is quite far away from it

derklaro commented 1 year ago

It should be - maybe there are some smaller breaking changes coming, but atm there are none I can think about. We're already using this version in CloudNet