Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
Are some detached DOM elements acceptable/unavoidable?

I'm building a React website and started getting an error message that there is a memory leak. Long story short, I figured out the source of the leak and resolved it, or at least got the error message to disappear.

But when I take HEAP snapshots, there still appears to be a memory leak. I'm still getting several DetachedHTMLDivElements and a bunch of other detached items that I'm not sure are relevant. I've attached the snapshot below.

HEAP snapshot

As someone new to web development, is it ever OK to have detached DOM elements? Are there situations where it's just unavoidable? Or should we always be eliminating these from our code?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!