Bug Tracker

Modify

Ticket #9462 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Frames Memory Leak with jQuery

Reported by: alexgalp Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, I got a simple test case which includes a main html page with a button that opens a modal page with 10 frames that imports jQuery. Each time I click the button, and than close the modal, the memory won't decrease back to it's normal (about 15 MB each click). i've tried all of the jQuery versions and none of them seems to solve the problem. I'm working with IE 6, and i heard that it has some serious garbage collect problems, so i tried to build one of my own inside the jQuery that cleans the variables, and it seems to minimize the problem, but sometimes can cause wierd bugs. There must be a solution for this problem..

I've seen some tickets similiar to this before but no effective solution was suggested, although the tickets were closed.

Thanks for your help.

Change History

comment:1 Changed 3 years ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to event

comment:2 Changed 3 years ago by rwaldron

Duplicate of #4693.

comment:3 Changed 3 years ago by alexgalp

it's not duplicate because no real solution has been suggested!

comment:4 Changed 3 years ago by alexgalp

So you just closed both tickets.. but there is still a bug.. you can't just ignore memory leak..

Version 0, edited 3 years ago by alexgalp (next)

comment:5 Changed 3 years ago by rwaldron

It's a duplicate because it's the same issue. Can you test using:

 http://code.jquery.com/jquery-git.js

This is a build of the _latest_ jQuery code

comment:6 Changed 3 years ago by alexgalp

ok, so i tested the git version and the bug still seems to be there.. i really need a solution for this.. is there anything you can do to help?

comment:7 follow-up: ↓ 8 Changed 3 years ago by alexgalp

we tried to fix this bug, because this issue is really annoying. what we tried to do is:

  1. add event 'onbeforeunload' to the window, that removes every frame before unloading, 2. add cleanup function to jquery that assigns null to most of its attributes + functions + local variables in onunload event, 3. minimize jquery-ui.js, especially removing 'datepicker' whick leaks in ie6.

it seems that this solved our memory leak (though we do not fully use jquery yet) and minimizes memory usage. We will surely know only after final checks.

comment:8 in reply to: ↑ 7 Changed 3 years ago by Booab

Replying to alexgalp:

we tried to fix this bug, because this issue is really annoying. what we tried to do is:

  1. add event 'onbeforeunload' to the window, that removes every frame before unloading, 2. add cleanup function to jquery that assigns null to most of its attributes + functions + local variables in onunload event, 3. minimize jquery-ui.js, especially removing 'datepicker' whick leaks in ie6.

it seems that this solved our memory leak (though we do not fully use jquery yet) and minimizes memory usage. We will surely know only after final checks.

Is it possible to provide the code for this? We are also facing the same issue with IE6 and have not found a decent solution although alot have been suggested. Thanks a lot

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.