Jump to content

Removing canvas from memory on view change


Recommended Posts

This maybe more of a specific backbonejs question but...

I building a backbonejs project with multiple views and different canvas's per view (one being a PIXI canvas another THREEJS).

I'm having trouble destroying the canvas from the previous view state, when switching views the previous canvas is still ticking over in the memory and not removed with the view

 

I render my views like so... (removing this.view is there, to do a clean render)

 slides: function () {                       if(this.view) {                this.view.remove();             }            this.view = new Slides() // THE SLIDE SCREEN}, 

This seems to destroy the view but not the canvas element inside of that view.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...