SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE Memory Leaks... Again

    Hello,

    I'm trying to solve a memory leak problem in IE.

    I've an object structure that wraps some DOM functionality that creates an element, applies some styling, adds any event listeners and inserts it into the DOM.

    To combat potential leaks I've correctly added/removed any DOM event listeners so none of those are leaking (I've confirmed this using "Drip"), but I'm still getting a 'considerable' memory leak.

    I'm guessing this is due to circular references - and if so, how do I go about finding them?

    Any help would be appreciated.

    Cheers,
    Dave

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE 6 leaks pretty bad, even though you set all the event handlers (helps a bit) to null before the page is unloaded

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I might have found the leak....

    If I set either the css display or visibility properties using javascript it causes the DOM Node to leak.

    Has anyone else encountered this?

    I guess I could solve it by setting a css class that contains the desired display property instead...

    Cheers,
    Dave

  4. #4
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This would be very interesting to see Dave, can u provide a small code snippet showing this leak?

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Pepejeria,

    Unfortunately it's just not possible to post a small code snippet - because of all the dependancies on other Objects and to post the lot would violate the security policy of the company I work for - and my 'bottom' would be on the line!

    It is a strange one as I've not heard of a leak affecting these two css properties - well its more of a pseudo leak, when nodes were being removed IE was retaining them in memory.

    Cheers,
    Dave


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
  •