YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

Manual: No explanation of what needs to be cleaned up when creating an instance of a particle system asset #7120

Closed KormexGit closed 2 weeks ago

KormexGit commented 2 months ago

Description

All of the info about memory leaks and cleaning things up in the manual that I can find are all referring to particles created in code. I can't find anything about what needs to be cleaned up when using a particle system asset. Based on what the manual is saying, it could be assumed that you need to destroy the emitters and particle types associated with a particle system asset every time you finish using it, but I feel like that's not actually the case. Honestly, I'm not confident on what exactly is supposed to be done because of the fact that the manual doesn't explain it. Does the system instance itself need to be cleaned up? Do you need to use particle_get_info to dig up the IDs of emitters and types to clean them up? Are the emitters and types instead global and don't need to be cleaned up?

Manual Link

https://manual.gamemaker.io/monthly/en/index.htm#t=GameMaker_Language%2FGML_Reference%2FDrawing%2FParticles%2FParticle_Systems%2FParticle_Systems.htm

YYBartT commented 2 weeks ago

part_system_destroy() also destroys all emitters and existing particles, both for particle systems created in code and created from an asset. Updated the description on the manual's function page and changed the code example to show create and destroy of a particle system created from an asset. Also updated the code example on the part_system_create() page, which shows the same for a particle system set up entirely in code. Updated all other manual pages about particles.