Apps with long run time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuzzy
    New Member
    • Apr 2008
    • 2

    Apps with long run time

    I've been using a javascript window system to make windows appear within a project of mine. within these dragable windows i have iframes which seems a great way to split up into forms, and much more managable. Though i noticed in ie that memory went threw the roof and even page refresh didn't free the memory only closing the browser would. I managed to fix this problem by makeing sure the iframe was connected to the document. There was also another method that worked in freeing memory after a page refresh. Which was putting elements into a div and setting teh div's innerHTML to "". Though it was only on page refresh it freed memory. So instead i reuse iframes now.

    Though this brought up alot of quistions. It seems that memory can not be freed untill page refresh with IFrames. Is this the case for all other elements?

    In long runnings apps this could be really annoying and it might be worth makeing a pool of objects that should be garbage collected and instead recycle them so when a div is needed again you use that one.

    Any Comments or suggestions would be much appreciated.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to bytes.com!

    You can check out Drip - a memory leak detector for IE.

    Also, watch out for accidental closures.

    Comment

    • Fuzzy
      New Member
      • Apr 2008
      • 2

      #3
      I already know about drip and drip will only detect elements that were not free'd after a page change. I dont have any problems with this type anymore. It also seems impossable to remove iframes and have memory available again. I was wondering if this is the case for all elements. Which can be worked around by reusing elements.(not classy i know, but it is an option).

      I supose i could do some tests myself. I was just hopeing someone already had experience with this.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        It seems this is a common problem in IE, more so when making heavy-use web apps. For iframes, this seems to work (but not sure how reliable it is) :
        [code=javascript]iframe.src = "javascript:fal se";[/code]

        Comment

        Working...