oωo (owo-lib)

oωo (owo-lib)

17M Downloads

[owo-ui] memory leak on the screens delete

Zailer43 opened this issue · 2 comments

commented

Using spark I realized that the owo-lib screens instances are not deleted, in this spark I have opened and closed many times the owo-academy screen to end up with 36 instances in memory.

https://spark.lucko.me/N1DjtJCKWU
image

owo-lib version = owo-lib-0.9.3+1.19.3
owo-ui-academy version = https://github.com/wisp-forest/owo-ui-academy/actions/runs/3656591552
spark version = spark-1.10.17-fabric

commented

in case anyone had a doubt if in the previous message I sent it before the garbage collector was executed, this sparkclient heapsummary is from a game of at least 6 hours.

https://spark.lucko.me/z5NKq5b6Nl
image

commented

This seems to be a Fabric API issue: it holds on to all screen events through a static field, that means that event handlers are kept, which means that screens are kept (through owo layers).
I'm going to make a PR that fixes this soon™