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)
follow-up: 2 comment:1 by , 15 years ago
comment:2 by , 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 , 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 , 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:6 by , 15 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [5984] in version: 3.3.7.0

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