-
Notifications
You must be signed in to change notification settings - Fork 75
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
Memory leak? #32
Comments
Might be. I think at least two goroutines ( Out of curiosity, why are you creating so many connections? |
I tried to use vova616/screenshot for VNC server. |
That library should probably expose a way to reuse a connection. Nevertheless, we shouldn't leak goroutines either. :-) |
I'm using https://github.com/kbinani/screenshot which depends on this library. |
@4nte There is a PR #44, which also fixes this issue. I have forked this repo, applied the fix and using it in my projects successfully. Maybe it helps. If it helps, write it here, maybe it helps to persuade the maintainer to merge the PR. Side note: There is also a PR #45, which adds some more tests and leakage tests. |
I will rewrite https://github.com/kbinani/screenshot to use your fork and test it. |
for i:=0; i<40000; i++ {
c, _ := xgb.NewConn()
time.Sleep(10*time.Microsecond)
c.Close()
}
produce 1.5 G of allocation
The text was updated successfully, but these errors were encountered: