metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG

Home Page:https://zzz.dog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scene = new Zdog.Anchor() - Memory Leak?

multiplayer-shop opened this issue · comments

Hello,
Here is my pseudo code:

var scene
scene = new Zdog.Anchor();

I do this over and over again when I want to recreate the scene:
scene = new Zdog.Anchor();

I don't remove all the old shapes I just wipe it all out by resetting the scene variable. It all works fine but I'm wondering if this creates a memory leak by not specifically removing all the shapes. (I would rather not)

Thanks

Hmm, I believe the old shapes will be garbage collected, as they are no longer 'in use' though the old scene. It would be same thing as overwriting a big object with another big object.