what is interesting if that if I uncomment the thing, the memory grows SLOWER, that might be a hint to the bug
//UNCOMMENTING THE FOLLOWING THE MEMORY GROWS SLWOER
// this_gets_freeds_ok := make([dynamic]string,500000)
// for &e in this_gets_freeds_ok {
// e="asd"
// }
the memory grows slower, I will just paste it uncommented, I also decreased the "frame limiter2 so be careful, dont uncomment free_all or your PC will lag instantly:
package main
import "core:strings"
import "core:os/os2"
YOUR_PATH :: "C:/Users"
main :: proc() {
@static counter:int
for true{
counter+=1
if counter % 1 == 0 do ExecuteEveryFrame(YOUR_PATH)
free_all(context.temp_allocator)
}
}
ExecuteEveryFrame :: proc(folderpath: string) {
context.allocator = context.temp_allocator
fileinfos, err_dirread := os2.read_all_directory_by_path(folderpath, context.temp_allocator)
// os2.file_info_slice_delete(fileinfos,context.temp_allocator) //doesnt help
this_gets_freeds_ok := make([dynamic]string,500000)
for &e in this_gets_freeds_ok {
e="asd"
}
}
I also noticed that the memory leak is almost independant of the frame limiter, it starts slowing down when I use count % 777 but I barely notice a dMEM/dt when I use 777 or 1