Opened 13 years ago

Closed 13 years ago

#1923 closed Bug (Fixed)

Memory consumption while FileOpen/FileClose

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: memory consumption Cc:


Prerequisite ... create file "$File" and deny yourself read/write rights on it (any file will do, can be empty).

Function "_Test2()" doesn't consume much memory while function "_Test1()" uses more and more memory ...

While 'TEST'
 _Test1(@ScriptDir & '\test.txt')

Func _Test1($File = '')
 $FileHandle = FileOpen ($File, 0)
  FileReadLine ($FileHandle, 1)
 FileClose ($FileHandle)
EndFunc ;=>_Test1

Func _Test2($File = '')
 FileReadLine ($File, 1)
EndFunc ;=>_Test2

If you could read this topic and see the full code:

Attachments (0)

Change History (6)

comment:1 follow-up: Changed 13 years ago by toofat (khrbud@…

Sorry ... my e-mail is khrbud@…

comment:2 in reply to: ↑ 1 Changed 13 years ago by MrCreatoR <mscreator@…>

Can not confirm, on my system the results are the same (working set is 4.5 mb maximum).

Environment(Language:0419 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)

comment:3 Changed 13 years ago by anonymous

My Environment(Language:Croatian Keyboard:Croatian OS:WIN_7/Service Pack 1 CPU:X64 OS:X64)
also tested on
Environment(Language:Croatian Keyboard:Croatian OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86)

Have you met "prerequisite" ???

Will try to test some more but ...

toofat (khrbud@…)

comment:4 Changed 13 years ago by Valik

I can confirm this. The following code is sufficient for reproducing the bug.

While True
	FileOpen ("", 0)

Seems there is an issue in FileOpen() that is causing a memory leak.

comment:5 Changed 13 years ago by Jon

A rookie error from me.

comment:6 Changed 13 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5984] in version:

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 owner will remain Jon.

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

Note: See TracTickets for help on using tickets.