Opened 10 years ago

Closed 10 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: Severity: None
Keywords: Cc:


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 Changed 10 years ago by Jpm

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

comment:2 Changed 10 years ago by kimyumiko@…


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)


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 Changed 10 years ago by Jon

  • Resolution set to Works For Me
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.