Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8779515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:48:28+00:00 2026-06-13T19:48:28+00:00

So, we’ve got memory leak in our mobile web application. It doesn’t seen on

  • 0

So, we’ve got memory leak in our mobile web application. It doesn’t seen on desktop, but it crashes mobile Safari browser(iOS 4, 5, 6) and crashes whole Android OS (checked on versions 2.2.x).

Crash happens usually when site left open for a long time.

We use:

  1. headjs (for js loading)
  2. yepnope (for css loading)
  3. socket.io
  4. jquery mobile

So I have following questions:

  1. Which of the following libraries can cause memory leak?
  2. Should we review code that uses jquery selectors, or may be we
    should work carefully with socket.io?
  3. May script loaders(headjs, yepnope) cause memory leaks, if we load
    20+ short scripts in them?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:48:29+00:00Added an answer on June 13, 2026 at 7:48 pm

    jQ mobile is known to cause leaks if you’re not careful. All in all, I think all 4 of the toolkits you’ve listed could cause issues, especially when you’re using them together.
    Perhaps the best thing you can do is stick to one lib, as much as possible, and focus on using it in such a way that leaks are kept to a minimum. The problem with mobile browsers is that there’s a lot more closure-magic going on, and the JS engines aren’t that well known/understood (yet). If you’ve ever dabbled with writing JS event delegation code for touch devices, you must’ve noticed that there’s just an incredible amount of closures, and DOM references that might not get GC’ed in time. There’s not an awful lot you can do about this.

    In general I tend to avoid using too many libs (I’m one of those ppl who will crawl to fire to avoid using any lib to be honest), so I might be biassed. But which ever way you put it: the combination of headjs and jQuery’s tendency to check for the ready event in all ways you can imagine could be troublesome: you’re dynamically loading new elements, have you checked if this triggers jQ’s ready event multiple times? If it does, you’re almost certainly binding the same handlers over and over and over again. Each ajax request might trigger the other toolkits to do the same thing, too, which might trigger jQuery again, which in turn might trigger the other libs again, which…
    You got the picture. Though I’m far from an expert, my guess would be that the one lib might trigger the other and vice-versa, causing a deadlock scenario. I base this on a vague recollection of a similar issue I’ve encountered a while back, and the fact that you’re using various libs to load scripts/CSS’s dynamically, and the fact that jQ doesn’t unbind all of its ready listeners last time I checked. If my hunch turns out to be right, you could use an evil global variable as a quick-fix:

    var jQReady = false;
    jQuery(document).load(function()
    {
        if (jQReady === true)
        {//was loaded
            return;
        }
        jQready = true;//<-- set to true on first invocation of callback
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.