andrew_klassen
Member
My game currently has a memory leak and will slowly crash. The following code is causing the leak, I've stiped down the code as much as possible to simplify the problem. I realize the code block below serves no functional purpose. I just want to understand it and why its consuming so much memory.
Manually destroying the buffer doesn't help either.
Manually destroying the buffer doesn't help either.
GML:
var npc_size_from_server = buffer_read(buffer, buffer_u32)
// this is a string created on the server using ds_grid_write()
var temp_string = buffer_read(buffer, buffer_string)
var temp_grid = ds_grid_create(NPC_SIZE, npc_size_from_server)
// this read is causing memory to be consumed, dont know why or how to free it
// if i comment out the read line, the memory leak stops
ds_grid_read(temp_grid, temp_string)
ds_grid_destroy(temp_grid)