Home » U++ Library support » TopWindow&PopUp, TrayIcon » [FIX] resizing eats memory
[FIX] resizing eats memory [message #22698] |
Thu, 06 August 2009 09:48 |
loki
Messages: 36 Registered: October 2007
|
Member |
|
|
Hello,
when I resize theIde or other U++ application, then it needs more and more memory which is not freed after stoping resizing. Is this normal? Why is this?
I resize using the border of the window.
WinVista 64Bit
Upp 1460
For example I have an application wich uses in maximized mode 2,3MB of memory. After resizing a bit, It uses more then 10MB. And more if I go on with resizing.
if compiled with gcc, then the memory usage grows faster as if compiled with msvc.
[Updated on: Mon, 10 August 2009 01:26] Report message to a moderator
|
|
|
Re: resizing eats memory [message #22728 is a reply to message #22698] |
Sun, 09 August 2009 17:28 |
|
mirek
Messages: 13976 Registered: November 2005
|
Ultimate Member |
|
|
What a nasty bug! (And quite critical one).
Well, it is not so bad, I believe it should have had stopped after eating 32MBs (can you check before syncing the fix?).
The cause was unfortunate interaction between MakeImage cache, its adaptive "max cache size" algorithm and Windows driven resizing of window; adaptive code required to be called in "job is done" situation, which was when in U++ message loop input queue is empty - it then increased maximum cache size to actual size needed in processing events.
However, when resizing, we are not in U++ loop, but windows performs its own, only calling WM_PAINT. Means adaptive algorithm had no chance to optimize and cache maxed out to upper limit - which, to make things worse, was slightly incorrectly set to 4 megapixels of Image data, which usually results in 32MB of total data.
All should fine now (on svn in one hour).
Mirek
[Updated on: Sun, 09 August 2009 17:31] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat May 11 11:33:08 CEST 2024
Total time taken to generate the page: 0.02675 seconds
|