www.webdeveloper.com

Search:

Type: Posts; User: Doug_Dyer

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. tcobb, since javascript is reference memory...

    tcobb, since javascript is reference memory based, I think the button is holding a reference to the function. Just a guess. If you set the button onclick method to null in killer, it should help. I...
  2. Unfortunately using IE I have no plugins...

    Unfortunately using IE I have no plugins installed except flash. I also use drip-05.exe (a windows browser that checks for leaks). I also don't use any plugins on firefox.
  3. [QUOTE=toicontien;1137274]The memory taken up by...

    [QUOTE=toicontien;1137274]The memory taken up by the script source of leak.js is probably not being garbage collected. Look at the code in that file, and see if any of that code is holding pointers...
  4. Interestingly enough it still leaks. Firefox...

    Interestingly enough it still leaks. Firefox leaks at a slower rate. Maybe IE does too but it doesn't look like it.

    So how do you folks add dynamic scripts wihtout leaking?
  5. I had a typo in my second post in the thread, so...

    I had a typo in my second post in the thread, so I bet the javascript aborted.

    Note the extra spaces before the period (.):


    myScript .type = 'text/javascript';
    myScript .src = 'leak.js';...
  6. I tried that in the following way: Make a div...

    I tried that in the following way: Make a div just to hold the script. Then on cleanup time, remove any children of the script node and any children of the div.

    but it still leaks....
  7. Thanks Kor, I believe you, but it leaks using...

    Thanks Kor,

    I believe you, but it leaks using any method I can see, that was just the most recent spin on things :)

    In my previous response I posted code that just remembers the node added...
  8. Thanks for the reply! Still leaks like mad. ...

    Thanks for the reply!

    Still leaks like mad. BTW it was finding the script using the getbyid. There has got to be a way to do this, right?

    My original code remembered the child node from the...
  9. bizarre memory leak... can anyone figure it out?

    The leak is classic: introduce a dynamic script DOM element, let the script execute, then remove the DOM node. Rinse. Repeat. The problem is the DOM element will not free and I cannot see any...
  10. Hey, maybe its the comments :) You are seeing...

    Hey, maybe its the comments :) You are seeing what I am seeing though.
  11. I see mine slowly growing by about 4K a second...

    I see mine slowly growing by about 4K a second with no stopping in sight (looking at the iexplorer.exe memusage in the task manager).

    I let mine run here for 1 minute and it has gone from 18,600K...
  12. Yep thats it. I removed any meaningful contents...

    Yep thats it. I removed any meaningful contents so as to elminate that script as being the cause of the leak.

    You can put whatever you want there, it will still leak.
  13. Its right there (My post above his): crap.js...

    Its right there (My post above his):
    crap.js (which gets loaded)

    memleak.htm (which loads crap.js)

    The leak occurs in netscape and explorer
  14. Here. Any help from anyone would be greatly...

    Here. Any help from anyone would be greatly appreciated.

    File 1, 'Crap.js':
    //hello


    File 2, 'memLeak.htm':
    <HTML>
    <SPAN id="myScript">
    <SCRIPT language="javascript">
  15. khalidali63, Its attached to the page in the...

    khalidali63,

    Its attached to the page in the following way (which may be wrong, I don't know):

    var span = document.createElement("SPAN");
    span.id = "myidtag" + this.m_index; // 0...
  16. Crap.js: //hello (thats it)

    Crap.js:

    //hello


    (thats it)
  17. There is no recursion. Here is an example HTML...

    There is no recursion.

    Here is an example HTML snippet:

    <HTML>
    <SCRIPT>
    var myObj = MyObj();
    myObj.m_url = "crap.js";
    window.setInterval("myTimeIntervalRoutine(1);", 500);...
  18. How to stop a memory leak in javascript? (appendChild/removeChild)

    My application performs the following on a time interval of 1/2 sec:

    myTimeIntervalRoutine(objindex)
    {
    var myObj = objList[objIndex];

    if (myObj.m_scriptNode)
    ...
  19. Thanks thats an idea, but I was trying to avoid...

    Thanks thats an idea, but I was trying to avoid non-reentrant solutions since there may be more than one instantiated object each running its own timer.

    I thought about a global array and each...
  20. Oh I was under the impression it would center it...

    Oh I was under the impression it would center it within the width, but I think I see what you are saying. Its the object that is centered at the block level.
  21. setTimeout and the 'this' reference (finding my object)

    I have a javascript class that would like to have its own setInterval feature. To do this, I would like the method invoked by the window to understand which object instance it is. Ideally, I could...
  22. How to center text created with doc.createTextNode()?

    Im trying to center text in a dynamically created <b> tag. Im really new at this, can someone point me in the right direction?


    var label = document.createElement("b");...
  23. No, no JS errors. The code is within a ...

    No, no JS errors.

    The code is within a <SPAN> area at the top of each src file for each frame.

    On an onload, I do setInterval on my routine. The javascript for each frame involves loading...
  24. Thanks for the reply. Thats what I thought,...

    Thanks for the reply.

    Thats what I thought, but when I have three frames, each with a setInterval, sometimes flipping forward and back with my main frame causes some of the surrounding frames to...
  25. setInterval not persistent when user leaves page and returns to it via "back" button

    Is there any reason why when a user loads a page with a setInterval, then leaves the page and returns to it via the BACK button of the browser, that the page now no longer has the setInterval stuff...
Results 1 to 25 of 36
Page 1 of 2 1 2
HTML5 Development Center



Recent Articles