[Solved] How do I dispose sprites?

I have a sprite that draws a grid.
The grid has a bunch of sprites contained inside.

1597550953942.png


Code:
var gridSprite = new Sprite_Grid();
// add weapon sprites to grid
SceneManager._scene._spriteset.addChild(gridSprite);

gridSprite.parent.removeChild(gridSprite);
gridSprite = null;
console.log(gridSprite);

The grid gets displayed and all the other sprites...but now I want to dispose of the grid.
Doesn't seem to work though.

Do I need to dispose ALL children sprites as well?
Nevermind, it was working actually. It's just that I was redrawing the sprites somewhere else and I didn't realize.

So it was disposing everything, and then re-drawing them immediately.
I personally have always tried to call 'destroy()' on sprite objects I create before the scene.terminate function runs, eg:
1597555525422.png


Something Mv never really seemed to do, but just made sense to me coming from ace 😀

MZ does seem to do a better job at automatically handling that though.
I personally have always tried to call 'destroy()' on sprite objects I create before the scene.terminate function runs, eg:
View attachment 155419

Something Mv never really seemed to do, but just made sense to me coming from ace 😀

MZ does seem to do a better job at automatically handling that though.

What does MZ do?
mz:
1597557393021.png


Compared to mv (which does absolutely nothing, which calls the default destroy from container class, which doesnt auto destroy children/textures it seems):
1597557441319.png

Original thread: https://forums.rpgmakerweb.com/threads/solved-how-do-i-dispose-sprites.125317/