Giter VIP home page Giter VIP logo

Comments (6)

mgol avatar mgol commented on June 15, 2024

Thanks for the report but I don’t understand the issue. Can you elaborate why the current behavior is problematic?

from jquery.

melloware avatar melloware commented on June 15, 2024

Well its a detached unused element reported by Chrome as a leak. Why keep an anchor around you don't need? I don't understand what you are asking that you don't understand?

The goal should be to never have detached DOM elements right?

from jquery.

mgol avatar mgol commented on June 15, 2024

It’s a single element, it doesn’t block a lot of memory. By keeping it, we avoid having to recreate one each time we need to normalize the href parts.

I understand you can find it in Chrome memory report but does it really cause any issue for the running website? Just seeing the node in a memory report is not a sufficient reason to change the code IMO.

from jquery.

timmywil avatar timmywil commented on June 15, 2024

Thank you for your contribution, but I don't think a change is needed here. This is not a memory leak. See #5458 (comment)

from jquery.

melloware avatar melloware commented on June 15, 2024

Understood but since this value won't change ever why keep the anchor around and not just store the simple string seems like an odd design choice...

from jquery.

timmywil avatar timmywil commented on June 15, 2024

That's a fair question. I think in this case the value you're referring to can change depending on the context so it needs to continue to reference the property on the element, rather than cache a previous value.

from jquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.