If I’m using FXLibary effects and custom effects, do I need to run FXLibary.CleanUp() and Particles.CleanUp()? Or is that redundant? [import]uid: 1560 topic_id: 12376 reply_id: 312376[/import]
I always call the Particles.CleanUp() when the game ends and I believe you will need to call that because it does not seem to get cleaned by the standard cleaning functions you might have.
I do
[lua]Particles.ClearParticles()
Particles.CleanUp()
CleanOtherStuff()[/lua]
I then created a function called CleanOtherStuff like below
[lua]CleanOtherStuff = function()
for i = g.numChildren,1,-1 do
local child = g[i]
child.parent:remove( child )
child = nil
end
end[/lua]
Inside the above function the main root displaygroup is called g but it might depend on the build you use beacuse Ansca has added support to clean all stuff below the level you run it on so when you run it on main display group it now should clean up everything good and well. [import]uid: 22737 topic_id: 12376 reply_id: 45181[/import]
Dotnaught, if you are using the FXLibrary, you should call both CleanUp’s. The FXLibrary’s CleanUp function just removes the sounds and preloaded particles images used by the FXLibrary, whilst Particles.CleanUp gets rid of all particles, particle types and emitters that have been created. The identical naming of both functions may be a bit confusing, but there is no relationship between them. [import]uid: 10504 topic_id: 12376 reply_id: 45429[/import]