Opened 12 years ago
Closed 12 years ago
#2515 closed Bug (Works For Me)
Force close the std out stream will have memory leak in windows XP
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.8.1 | Severity: | None |
| Keywords: | Cc: |
Description
If we use StdioClose to force close the std out stream, it will have memory leak.
I use a loop, each time I will call a command line function, "dir" in this case. I use StdioClose to close the std out stream. After each loop, I can see the memory of the process increase.
Let it run for a while, the memory continues to increase; and I see the process consume 100% CPU.
This issue can reproduce easily in windows XP.
Attachments (0)
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Hi,
Example script:
While 1 $folderLocation = "C:\TestFolder" $dirCommand = "dir *.TXT /B /OD /TC |more" $ConsolePID = Run(@ComSpec & " /c " & $dirCommand, $folderLocation, @SW_HIDE, $STDOUT_CHILD) ;just read std out 1 time $stdRead = StdoutRead($ConsolePID) StdioClose($ConsolePID) Sleep(1000) WEnd
NOTE: If we use a loop to read all the data of the std out stream, then call StdioClose, the memory leak will not happen. Memory leak only occurs when we don't read all the data.
comment:3 by , 12 years ago
| Resolution: | → Works For Me |
|---|---|
| Status: | new → closed |

Can you add a repro script to be sure in which case the memory leak is occuring?
Thanks