Memory Leak when navigating between pages located in separate files (JQM 1.4 final) #6816

Closed
wauwau0977 opened this Issue Dec 20, 2013 · 3 comments

3 participants

@wauwau0977

Hi

JQM leaves some detached DOM objects. Depending on the structure of the page this may cause a significant memory leak.

Attached is the simplest case i can imagine. It will reproduce the behaviour. Also attached some screenshot with Google Chrome Profiler. Please switch 10x between page1 and page 2 to see an increase of about 100k...

This can be reproduced with JQuery 1.x and 2.x.

Our application is much more complex then the example, so we see rather big memory increase. Important: It seems as the demo i attached has just one simple leak. Unfortunately we see in our real application much more (since we use more widgets and events).

If you need more info, please ask...

The working demo that reproduces the behaviour can be downloaded from:
http://mindalyze.com/develop/JQueryMobile14MemoryLeak.zip (showcase folder)

chrome_devtools_memory_snapshot

Best regards,
Patrick Heusser

@arschmitz
jQuery Foundation member

Thank you for reporting this issue. For us to look into their further can you please see our contributing guidelines at https://github.com/jquery/jquery-mobile/blob/master/CONTRIBUTING.md and create a jsbin test page which reproduces the issue. For now i'm going to close this as incomplete. We will reopen when the requested information is provided.

@arschmitz arschmitz closed this Jan 2, 2014
@wauwau0977

Thanks for having a look at it... I completely understand, that you like to see the bug in standard view like jsbin.

i tried to create a jsbin version, unfortunately with multiple pages when JQM tries to load the new page, it gets a JSON object from jsbin...

http://jsbin.com/IVImOfa/latest/quiet

the zip i attached already contains a nice test setup, it just needs to be extracted and clicked to run... it's even cleaner, since it's "pure"...

please give it a look, we really struggle with the memory leak here...

regards,
patrick

@arschmitz arschmitz reopened this Jan 16, 2014
@arschmitz arschmitz added a commit that referenced this issue Jan 22, 2014
@arschmitz arschmitz AnimationComplete: Add transition, fallbacks and remove memory leaks
Also no its own module including support tests for animations and
transitions

Fixes gh-5156
Fixes gh-6816
Fixes gh-6697
Fixes gh-6895
Fixes gh-6148
f4fbff2
@arschmitz arschmitz added a commit that referenced this issue Feb 12, 2014
@arschmitz arschmitz AnimationComplete: Add transition, fallbacks and remove memory leaks
Also no its own module including support tests for animations and
transitions

Fixes gh-5156
Fixes gh-6816
Fixes gh-6697
Fixes gh-6895
Fixes gh-6148
Closes gh-7001
0793219
@arschmitz arschmitz added a commit that closed this issue Feb 12, 2014
@arschmitz arschmitz AnimationComplete: Add transition, fallbacks and remove memory leaks
Also no its own module including support tests for animations and
transitions

Fixes gh-5156
Fixes gh-6816
Fixes gh-6697
Fixes gh-6895
Fixes gh-6148
Closes gh-7001
749c78e
@arschmitz arschmitz closed this in 749c78e Feb 12, 2014
@voronianski

@arschmitz @wauwau0977 is it possible to prevent this memory leak without updating to 1.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment