Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

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

Comments

@wauwau0977
Copy link

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
Copy link
Contributor

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.

@wauwau0977
Copy link
Author

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 added a commit that referenced this issue Jan 22, 2014
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
arschmitz added a commit that referenced this issue Feb 12, 2014
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
@voronianski
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants