Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

How to destroy player instance? #166

Open
mebtte opened this issue Nov 9, 2021 · 4 comments
Open

How to destroy player instance? #166

mebtte opened this issue Nov 9, 2021 · 4 comments

Comments

@mebtte
Copy link

mebtte commented Nov 9, 2021

const player = new SVGA.Player(node);
// and how to destroy player instance

player.clear only clear the canvas, and how to destroy player instance?

@zhiyuanL
Copy link

我也遇到了同样的问题,多个player的话。很容易爆内存

@Naeemo
Copy link

Naeemo commented Nov 15, 2021

player = null

@mebtte
Copy link
Author

mebtte commented Nov 16, 2021

player = null

Player have created canvas inside, player = null will not remove canvas.

@Naeemo
Copy link

Naeemo commented Nov 16, 2021

player = null

Player have created canvas inside, player = null will not remove canvas.

🤔 if legacy browsers are not concerned, you can check out my fork svga-web

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants