Page 1 of 1
Memory Leak in GetFileDate
Posted: Sat Oct 18, 2025 2:35 pm
by Thorium
Reproduced on: Windows 11, PureBasic 6.21 x64 and 6.30 Beta 3 x64
Run following code and open the task manager, watch as memory usage increases indefinitely.
Code: Select all
Repeat
Delay(1)
GetFileDate("C:\Windows\notepad.exe", #PB_Date_Modified)
ForEver
Re: Memory Leak in GetFileDate
Posted: Sat Oct 18, 2025 4:38 pm
by skywalk
Ouch, does it matter which compiler options?
Re: Memory Leak in GetFileDate
Posted: Sat Oct 18, 2025 5:49 pm
by le_magn
Confirmed on 6.21 64bit
Re: Memory Leak in GetFileDate
Posted: Sun Oct 19, 2025 1:24 am
by BarryG
Which memory type are you monitoring? There's several in Task Manager so maybe I'm looking at the wrong type?

Re: Memory Leak in GetFileDate
Posted: Sun Oct 19, 2025 8:59 am
by Thorium
skywalk wrote: Sat Oct 18, 2025 4:38 pm
Ouch, does it matter which compiler options?
I have reproduced it with the default options, didnt try anything else.
My guess is that the function simply does not free a handle.
Re: Memory Leak in GetFileDate
Posted: Sun Oct 19, 2025 9:01 am
by Thorium
BarryG wrote: Sun Oct 19, 2025 1:24 am
Which memory type are you monitoring? There's several in Task Manager so maybe I'm looking at the wrong type?
I guess "working set" should show it.
Re: Memory Leak in GetFileDate
Posted: Sun Oct 19, 2025 10:34 am
by BarryG
Thorium wrote: Sun Oct 19, 2025 9:01 amI guess "working set" should show it.
Bug confirmed here with Win 11 Pro and PureBasic 6.30 Beta 3. The memory shown by Working Set rises slowly.
No such problem with PureBasic 6.10 with the same code on the same PC (the Working Set value stays the same).