SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2007
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force Javascript dereference?

    Is it possible to force a Javascript dereference to reclaim some browser memory?

    I have a web app which uses wizards and when a wizard completes/exit, I'd like to dereference all wizard Javascript. I'm noticing via my task manager that the browser memory doesn't seem to be reclaiming itself when exiting the wizard.

    I only have IE 6/7 to worry about, is there something I can try/test with onbeforeunload?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    it sounds like you have some circular references that aren't being addressed.

    I suggest that you google search for information about javascript garbage collection, memory leaks, and circular references.

    Some useful resources are
    http://blog.grimpoteuthis.org/2005/0...ike-sieve.html
    http://www.jibbering.com/faq/faq_notes/closures.html
    http://javascript.crockford.com/memory/leak.html
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •