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 6339719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:41:59+00:00 2026-05-24T19:41:59+00:00

When running the following script in Safari and Firefox 5 (other browsers not tested),

  • 0

When running the following script in Safari and Firefox 5 (other browsers not tested), the memory usage of both browsers increase drastically. But after the function finished, the memory usage still keeps being very high. Safaris memory usage grows by ~80MB, FF up to 200MB.

Any thoughts why, even after some minutes, the memory usage does not decrease?

<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <script type="text/javascript">
      window.onhashchange = function() {
        var i = 1; // do something
      };

      function leakIt() {
        for(var i = 0; i < 10000; i++) {
          window.location.hash = i%4; // Trigger onhashchange
        }
      };

      window.onload = function() {
        document.getElementById('leak').addEventListener('click', leakIt,false);
      };
    </script>
  </head>
  <body>
    <button id="leak">Leak it!</button>
  </body>
</html>

Additional information

If I reload the page in Safari and call the leakIt function again, the memory increases by about 20MB and after leakIt terminates, the memory usage goes back to the amount after the first call to leakIt.

  • 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-05-24T19:42:00+00:00Added an answer on May 24, 2026 at 7:42 pm

    What happend when you refresh the page? While you keep refreshing page and the memory keep increasing,That is memory leak.You can use Sieve to detect that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following script below is not running in IE7 but works perfectly fine in
When running the following script: on run tell application Safari set allWins to every
Hi I have the following script which works fine running on IIS but when
When running the following script in Safari (with the Inspector open) window.onload = function()
I have the following line in a script I am running in the Run
I am running following query in SQL*Plus CREATE TABLE tbl_audit_trail ( id NUMBER(11) NOT
In the following script, I get the stop message received output but the process
On running the following script, I get segmentation fault. The output consists of here
I'm running the following script: cause = c(1, 1, 1, 1, 1, 2, 1,
I'm running the following WMI script to get the associations between drive letters and

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.