Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:23:46+00:00 2026-06-09T08:23:46+00:00

according to mdn documentation the method removeChild removes a node from the DOM but

  • 0

according to mdn documentation the method removeChild removes a node from the DOM but it still resides in memory.
My problem is that I want to delete it from memory as well.
I’ve tried with the delete operator but the object is still there…

myCanvas.parentElement.removeChild(myCanvas);  // myCanvas actually removed from DOM
delete myCanvas;  // false. does nothing
alert(myCanvas); // shows HTMLCanvasElement instead of undefined
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:23:53+00:00Added an answer on June 9, 2026 at 8:23 am

    Read http://perfectionkills.com/understanding-delete/. The delete operator is not for variables (that’s why it returns false).

    If you want to remove the variable’s reference to the DOM node, use

    myCanvas = null;
    

    to overwrite the value. Usually you never need to do this, because the garbage collector of JS does all the work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to Hibernate documentation : After observing that arrays cannot be lazy , you
According to MDN documentation for JSON.stringify : Properties of non-array objects are not guaranteed
There is HTML page with contents like this. Documentation at MDN says that childNodes
According to the PHP Documentation PDO::prepare() adds quotes to all your parameters so that
According to the MDN JS Doc , the charAt method takes in an integer
So according to MDN (it makes sense) the AnimationEvent has the bubble argument but
According to the PHP documentation: The overload() function will enable property and method call
According to the MDN wiki, DOMContentLoaded will fire when page's DOM is ready, [although]
According to the RDoc documentation , names of classes, source files, and any method
According MSDN, FxCop is an application that analyzes managed code assemblies (code that targets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.