Skip to content

add dispose method - #96

Open
trusktr wants to merge 2 commits into
mrdoob:masterfrom
trusktr:patch-1
Open

add dispose method#96
trusktr wants to merge 2 commits into
mrdoob:masterfrom
trusktr:patch-1

Conversation

@trusktr

@trusktr trusktr commented Mar 25, 2019

Copy link
Copy Markdown

No description provided.

Comment thread src/Stats.js
dispose: function () {

container.removeEventListener( 'click', clickHandler );
container.remove();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need container.remove();? Or should we leave that part to the user?

@trusktr

trusktr commented Mar 25, 2019

Copy link
Copy Markdown
Author

Maybe we don't need this at all, if it is true that the handler will be cleaned up if the app is free of references to he dom element.

Apparently old browsers like IE8 had issues, but Three.js is IE11 and up right?

@trusktr

trusktr commented Mar 25, 2019

Copy link
Copy Markdown
Author

Well, it doesn't hurt to perform this dispose, just to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant