It started at 3,952k then after I opened some windows it became 3,964kb and it stays stable at that. Now, I remove the 'WindowFromPoint' and set the handle at 0 for the 'GetWindowText' to get the text. With just 'WindowFromPoint' the usage is stable at 3,924k. And, after I wrote this reply, now it is at 4,280k. After opening new programs (Notepad, Regedit, Firefox, MsPaint, Onscreen Keyboard, control panels applets, etc.) and closing their windows, the script used RAM at 4,248k. Now it doesn't always take RAM immediately after new window shows up. I don't know if this is just my feeling or not.but it seems the leak is getting a bit smaller. However, I doubt this is the case tho, or is it? Hmm.as a matter of fact, on the PC that I'm using, I use the 'Self Extracting Archive' version of Autoit, the one that I don't have to install (I try to reduce information being add to the system). No Autoit was running on different PC, I was just running the compiled version of the above code. The different PC was running WIN XP SP2 the same with what I'm using.ģ. I verify RAM usage by using TaskManager, the 'Mem Usage' column.Ģ. AutoItWinGetTitle()/AutoItWinSetTitle() ġ._WMIDateStringToDate()/_DateToWMIDateString()._RockPaperScissors()/_RockPaperScissorsLizardSpock()._GetBackgroundColor()/_SetBackgroundColor()._ConvertLHWebColor()/_ConvertSHWebColor().PS: Oh, almost forgot, I know one way to patch the memory leak using 'EmptyWorkingSet'. Now, the leak is gone if I take out 'GetWindowText', so the script only calls 'WindowFromPoint'.Ĭan someone please tell me this is a memory leak or not, and how to make the memory stable? However, slowly it will become less aggressive when no new window appears, but it still eats a bit here and there. In the test on my PC, the script would take around 4-16kb if a new window appears. $FPointWinTitle=DllCall("user32.dll", "int", "GetWindowText", "hwnd", $hPoint, "str", "", "int", 32768)Īs you can see, it mostly does dllcalls on user32 'WindowFromPoint' and 'GetWindowText'. $hPoint = DllCall("User32.dll", "hwnd", "WindowFromPoint", "int", $Mpos, "int", $Mpos) I have a simple function, but somehow it keeps eating RAM little by little. So, I'm sorry if this has been answered before. I had been searching and reading the forum about memory leak, but couldn't find anything related.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |