go-qt5
go-qt5 copied to clipboard
Event handling related memory leak
If you go run minimal.go and keep resizing the window for a while, you'll see that the memory usage goes up.
(from http://github.com/visualfc/go-ui/issues/10)
I have tried what he said and see no consistent leaking behavior, the virtual memory usage randomly increases and randomly drops, no real consistent changes, after a while it's pretty much the same number. Is there really a clear evidence? Have you tested it thoroughly?
Is there really a clear evidence? Have you tested it thoroughly?
No, I haven't; as I mentioned in README, I don't have any time to work actively on this project. Have you? It may be restricted to a certain event type.
I have tried what he said and see no consistent leaking behavior, the virtual memory usage randomly increases and randomly drops, no real consistent changes, after a while it's pretty much the same number.
I remember checking this with minimal.go 2 years ago, and I did observe the memory leak. I'm not sure what has changed in go/qt5 since then, but I can't seem to reproduce it now with qt 5.4.1 and go 1.4.2.
I'll keep this issue open until we have a test for this. Thanks for testing it!
I guess it's somehow automatically fixed by either the updated Qt or the updated cgo then, that could only be good news :smile: . Also, what do you mean by "a test"? How is it supposed to be created? Do you mean having valgrind available for cgo or something?
A test that programmatically creates a lot events and watches the memory usage via procfs, you wouldn't need valgrind or cgo for that.