Modify

Opened 15 years ago

Closed 15 years ago

#1923 closed Bug (Fixed)

Memory consumption while FileOpen/FileClose

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

Description

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')
WEnd
Exit

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:
http://www.autoitscript.com/forum/topic/128370-script-memory-usage/

Attachments (0)

Change History (6)

comment:1 by toofat (khrbud@…, 15 years ago

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

in reply to:  1 comment:2 by MrCreatoR <mscreator@…>, 15 years ago

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 by anonymous, 15 years ago

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 by Valik, 15 years ago

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

While True
	FileOpen ("", 0)
WEnd

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

comment:5 by Jon, 15 years ago

A rookie error from me.

comment:6 by Jon, 15 years ago

Milestone: 3.3.7.0
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [5984] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.