Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fix this window.open memory leak IE?
    primarykey
    data
    text
    <p><strong>UPDATE:</strong> I posted this question a year ago, funnily enough I have the same issue on a project I'm working in mainly IE7. Basically I got IE7 in WinXP SP3 virtual pc installed sIEve and memory leaks would occur with the code below. Basically I want no code leaks with the sample code I provided below, any help would be appreciated</p> <p>I was recently looking at this memory leak tool sIEve: <a href="http://home.orange.nl/jsrosman/" rel="nofollow noreferrer">http://home.orange.nl/jsrosman/</a></p> <p>So I decided to test out the tool by creating a main page that will open up a popup window. I started by creating 3 pages: index.html, page1.html and page2.html, the index.html page will open a child window (popup) linking to page1.html. Page1 will have a anchor tag that links to page2.html, while page2 will have a link back to page1.html</p> <p><strong>PROBLEM</strong></p> <p>So in the tool I entered the index.html page, popup window opened to page1.html, I then clicked the page2 link, no leaks detected yet.</p> <p>While I'm on page2 I click the link back to page1, and that's where the tool claims there is a link. The leak seems to be happening on the index.html page and I have no idea as to why it would be doing that. Even more concerning is that I can see elements that the tool detects that aren't even on my page.</p> <p>Does anyone have any experience with this tool or know if this really is a memory leak? Any samples of showing how to achieve what I'm doing without memory leaks?</p> <p><strong>INDEX.HTML</strong> </p> <pre><code> &lt;script type="text/javascript"&gt; MYLEAK = function() { var childWindow = null; function showWindow() { childWindow = window.open("page1.html", "myWindow"); return false; } return { init: function() { $("#window-link").bind("click", showWindow); } } }(); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a id="window-link" href="#" on&gt;Open Window&lt;/a&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { MYLEAK.init(); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>PAGE1.HTML</strong></p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;h1&gt;Page 1&lt;/h1&gt; &lt;a href="page2.html"&gt;Page2&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>PAGE2.HTML</strong></p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;h1&gt;Page 2&lt;/h1&gt; &lt;a href="page1.html"&gt;Page1&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Appreciate your efforts.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload