S
SexySicilianSoprano
Guest
Aloha snackbar, fellow GManiacs.
I've got a few questions about carbage collection and data flushing. I am aware that user-made data structures must be deleted manually, which I am currently doing, but I'm facing some problems. We've made a procedural generation that generates creates new rooms from binary files and a new floor pattern for the rooms each time a certain type of room is reached within the game. I have a script that's supposed to flush each and every list and map I have used in generation before starting a new generation.
Still, the game is leaking memory pretty badly. It is also supposed to clear a lot of objects, a few lists and other stuff every time I exit a room. I call "with(objectname) instance_destroy;" on a lot of things. This, however, doesn't seem to do much.
What I wish to know is that does ds_list_destroy also destroy all the data it references or does it only destroy the references to them? Is there a way to destroy old rooms the player cannot and should not access anymore? How exactly does GM:S's garbage collection work, is there something I've failed to understand? I've tried googling a lot, but can't seem to find information that relates to my problems.
I'm also facing another specific issue, possibly related to memory leaking: our main character has this scarf that follows behind him. Almost every time the debugger memory graph goes over 40MB, the scarf's components are destroyed. After that they're destroyed more frequently (I destroy and recreate the scarf every time the player enters the room to prevent a lot of strange -ups because math n stuff), pretty much every time a lot of enemies die at the same time. I tagged all places that called for scarf's instance_destroy(), but each time it happened, it wasn't either of them.
Some extra information: we have an object-based custom particle system, that creates particles with physics so that they may interact with the room ie. blood splattering stays on walls. The blood effect is called every time an enemy dies, the particles are destroyed within some seconds and they're supposed to be flushed every time the player exits the room.
It's a lot of text, I know, but bear with me. If you need to know more of our engine, I'll be happy to oblige if it means we can get our stuff fixed as soon as possible.
Thanks in advance!
I've got a few questions about carbage collection and data flushing. I am aware that user-made data structures must be deleted manually, which I am currently doing, but I'm facing some problems. We've made a procedural generation that generates creates new rooms from binary files and a new floor pattern for the rooms each time a certain type of room is reached within the game. I have a script that's supposed to flush each and every list and map I have used in generation before starting a new generation.
Still, the game is leaking memory pretty badly. It is also supposed to clear a lot of objects, a few lists and other stuff every time I exit a room. I call "with(objectname) instance_destroy;" on a lot of things. This, however, doesn't seem to do much.
What I wish to know is that does ds_list_destroy also destroy all the data it references or does it only destroy the references to them? Is there a way to destroy old rooms the player cannot and should not access anymore? How exactly does GM:S's garbage collection work, is there something I've failed to understand? I've tried googling a lot, but can't seem to find information that relates to my problems.
I'm also facing another specific issue, possibly related to memory leaking: our main character has this scarf that follows behind him. Almost every time the debugger memory graph goes over 40MB, the scarf's components are destroyed. After that they're destroyed more frequently (I destroy and recreate the scarf every time the player enters the room to prevent a lot of strange -ups because math n stuff), pretty much every time a lot of enemies die at the same time. I tagged all places that called for scarf's instance_destroy(), but each time it happened, it wasn't either of them.
Some extra information: we have an object-based custom particle system, that creates particles with physics so that they may interact with the room ie. blood splattering stays on walls. The blood effect is called every time an enemy dies, the particles are destroyed within some seconds and they're supposed to be flushed every time the player exits the room.
It's a lot of text, I know, but bear with me. If you need to know more of our engine, I'll be happy to oblige if it means we can get our stuff fixed as soon as possible.
Thanks in advance!