Memory leaks in QPushButton or what? [moved to bugtracker]
-
Nope. memory usage grows when I just move the mouse over the buttons.
-
bq. Use software for detecting memory leaks.
It shows that the leak is not in my code.
bq. Does it still happen after you fix the obvious memory leaks I pointed out?
How it may affect what I'm saying? There is no way.
These widgets are created once. -
[quote author="anaksimandr" date="1355070814"]bq. Use software for detecting memory leaks.
It shows that the leak is not in my code.[/quote]
What tool did you use? And what exactly did it detect?
You say you are using Qt5. Qt5 is still under development. So do you use the latest Release Candidate?
If so and if you have a meaningful leak report from your tool, you should open a BugTracker ticket.
Otherwise, try updating first...
[quote author="anaksimandr" date="1355070814"]bq. Does it still happen after you fix the obvious memory leaks I pointed out?
How it may affect what I'm saying? There is no way.
These widgets are created once.[/quote]If you think you have a memory leak somewhere and there is a very obvious leak in your own code, it would be logically to fix the obvious leak first and then check again whether there still indication for another leak...
-
What are you talking about? I push the button only one time and the widgets creates only one time so there is no leak in it. Do not waste my time with empty speculation. I don't want to talk about it more.
I don't open a bug ticket because memory freed when I close the widget where the buttons are so it's strange (not simple leak). Dragging mouse over the buttons eats memory but the memory frees when the buttons destroys.
I'm using qt5 beta2 and VC++ with crtdbg.h. It shows something like
{8158} normal block at 0x036FE050, 24 bytes long.
Data: <- o > 2D 91 C1 CD CE CD CD CD 01 00 00 C0 A8 E0 6F 03
{8157} normal block at 0x036FE008, 8 bytes long.
Data: < > 00 00 00 00 FF FF CD CD
{8156} normal block at 0x036FDFB0, 24 bytes long.
Data: < o > C9 90 C1 CD CE CD CD CD 01 00 00 C0 08 E0 6F 03
{8155} normal block at 0x036FDF68, 8 bytes long.
Data: < > 00 00 00 00 FF FF CD CD
{8154} normal block at 0x036FDF10, 24 bytes long.
Data: <, h o > 2C 91 C1 CD CE CD CD CD 01 00 00 C0 68 DF 6F 03
{8153} normal block at 0x036FDEC8, 8 bytes long.
Data: < > 00 00 00 00 FF FF CD CD
{8152} normal block at 0x036FDE70, 24 bytes long.
Data: < o > C8 90 C1 CD CE CD CD CD 01 00 00 C0 C8 DE 6F 03
{8151} normal block at 0x036FDE10, 32 bytes long.
Data: <p o o o P o > 70 DE 6F 03 B0 DF 6F 03 10 DF 6F 03 50 E0 6F 03
{8150} normal block at 0x036FDDC8, 12 bytes long.
Data: < g o > C8 0D 18 67 04 00 00 00 10 DE 6F 03
{8149} normal block at 0x036FDD68, 32 bytes long.
Data: < o > C8 DD 6F 03 CD CD CD CD CD CD CD CD CD CD CD CD
{8148} normal block at 0x036FDCE8, 64 bytes long.
Data: < o D g > CC CD CD CD F0 DB 6F 03 44 C2 18 67 01 00 00 00
{8144} normal block at 0x036FDBF0, 70 bytes long.
Data: < > 02 00 00 00 0D 00 00 00 1B 00 00 00 10 00 00 00
{8135} normal block at 0x036FD280, 12 bytes long.
Data: <p o o > 70 82 6F 03 AD 17 05 E4 F8 D6 6F 03
{8134} normal block at 0x036FDBA8, 8 bytes long.The dump is very long and there is no links to files in it so this leaks is not in my test app.
-
Oh, god. I can't repeat this situation in WindowsXP. Can some one try to repeat this in Windows 7 32bit? My screenshot was made in Windows7 64bit.
-
[quote author="anaksimandr" date="1355079987"]What are you talking about? I push the button only one time and the widgets creates only one time so there is no leak in it. Do not waste my time with empty speculation. I don't want to talk about it more.
I don't open a bug ticket because memory freed when I close the widget where the buttons are so it's strange (not simple leak). Dragging mouse over the buttons eats memory but the memory frees when the buttons destroys.
[/quote]Hi,
please be patient. There are real memory leaks in your code, regardless if you click the button once or more often. That was just pointed out.The thing you describe is something like:
My app is running and hovering the mouse over buttons increases the memory usage in the process explorer. When I close the window, the memory goes away. Right?
This is IMHO no memory leak, it's memory usage. Hovering over controls perhaps creates new images for displaying them or other stuff. A leak is typically not anymore referenced memory, which means it will never be freed again.
-
bq. Hi,
please be patient. There are real memory leaks in your code, regardless if you click the button once or more often. That was just pointed out.
The thing you describe is something like:
My app is running and hovering the mouse over buttons increases the memory usage in the process explorer. When I close the window, the memory goes away. Right?
This is IMHO no memory leak, it’s memory usage. Hovering over controls perhaps creates new images for displaying thYou are right in all, but how such simple app can use over 100mb memory? This is my question. More moves more memory. Why?
Here was found that problem is in windows7 style.
http://stackoverflow.com/questions/13796842/memory-leaks-in-qpushbutton-or-what -
If you are sure there is a memory leak, then "please file a bug report":https://bugreports.qt-project.org/ . Mentioning issues in random places on the internet (stackoverflow or here) will not get anything fixed.
-
task opened "QTBUG-28506":https://bugreports.qt-project.org/browse/QTBUG-28506