Posts: 32
Threads: 10
Joined: Feb 2009
Hello Gintaras
I have been looking at your OSD_WndProc to find info about 'how to do'.
Then i cannot find any 'RemoveProp' - is this a mistake or is it not nescesary ?
I think that when window is destroyed, there's no need for the property anymore - so system should remove it.
And is there any reason for me to use windows properties instead of thread variables ?
Joergen
Posts: 12,073
Threads: 140
Joined: Dec 2002
I think Windows should free memory of window properties when the window is destroyed. But in SetProp documentation it says all properies must be removed explicitly, so I think I should do it.
Thread variables are OK when you know that the thread will have only 1 window that uses the variable. Or several windows but not simultaneously.
Posts: 12,073
Threads: 140
Joined: Dec 2002
Tested. Windows does not implicitly free the memory used for window properties. If I set thousands of props and don't remove them, later SetProp fails. Error "Not enough storage is available to process this command". This is in all processes not only in QM. Also, clipboard and drag&drop stops working, etc. Restarting QM does not help, need to restart Windows. Maybe props are added as global atoms, and the number of atoms is limited.
Posts: 32
Threads: 10
Joined: Feb 2009
I guess this will be corrected in next version of QM. Good to know that i have done something to help reducing 'bugs'.
Posts: 12,073
Threads: 140
Joined: Dec 2002
yes, thank you very much.
Posts: 32
Threads: 10
Joined: Feb 2009
Will also QM 2.2.1.5 be updated ?
I have made a very large macro system with 3 running functions in background, 4 transparent windows, lots of menues, toolbars and other things.
This works on QM 2.2 - but on the newest version something seems to go wrong - and then there is no reason for me to upgrade.
Posts: 12,073
Threads: 140
Joined: Dec 2002
QM 2.2.1 will not be updated.
I found that this is not a serious bug. Windows automatically frees prop memory, leaves just the string in global atom table. So SetProp can be called without RemoveProp any number of times if the string is the same. Would be problem if would use different string every time.