Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minecraft.Conn: Memory leak (objects are never freed) #7

Closed
gioiann opened this issue Jul 9, 2019 · 4 comments
Closed

minecraft.Conn: Memory leak (objects are never freed) #7

gioiann opened this issue Jul 9, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@gioiann
Copy link

gioiann commented Jul 9, 2019

mem

When I first join the proxy the memory will raise and stop at about 30MB but if I keep joining the used memory will increase about 5 or 10 MB everytime i join. So, by joining like 10 times it reached 80MB and it will keep increasing if I keep joining.

This is without lua. I think 80MB or even 30MB is a lot for a proxy which does nothing but forward packets.

Does the proxy keep chunks, skins, resource packs ?

@Sandertv
Copy link
Owner

Sandertv commented Jul 9, 2019

5-10MB per connection is to be expected. It caches used memory so that it doesn't have to re-allocate every time for packet reading. If it isn't deallocated though, there might indeed be a leak present. I'll get to debugging it.

@Sandertv Sandertv added the bug Something isn't working label Jul 9, 2019
@Sandertv Sandertv changed the title Memory leak minecraft.Conn: Memory leak (objects are never freed) Jul 9, 2019
@Sandertv
Copy link
Owner

Fixed by 17f17ca.

@gioiann
Copy link
Author

gioiann commented Jul 11, 2019

@Sandertv Did you test? It's still happening for me

@Sandertv
Copy link
Owner

It sounds to me like the garbage collector doesn't deem it necessary to run yet. There were actually (multiple) memory leaks, but those were resolved in the commit above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants