go-qt5 icon indicating copy to clipboard operation
go-qt5 copied to clipboard

Event handling related memory leak

Open salviati opened this issue 11 years ago • 6 comments

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)

salviati avatar Sep 08 '13 07:09 salviati

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?

hami9x avatar May 01 '15 06:05 hami9x

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.

salviati avatar May 03 '15 18:05 salviati

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.

hami9x avatar May 05 '15 13:05 hami9x

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!

salviati avatar May 06 '15 00:05 salviati

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?

hami9x avatar May 06 '15 16:05 hami9x

A test that programmatically creates a lot events and watches the memory usage via procfs, you wouldn't need valgrind or cgo for that.

salviati avatar May 07 '15 00:05 salviati