#14 Strange leak detected

closed
nobody
None
5
2007-08-16
2007-08-16
No

Drip will detect a leak with the following code:

----

window.onload = function()
{
var tempSpan = document.createElement( 'span' ) ;
}

----

Nothing is detect for this instead:

----

window.onload = function()
{
var tempSpan = document.createElement( 'span' ) ;
document.body.appendChild( tempSpan ) ;
}

----

Just to test it, I've tried the following script:

----

window.onload = function()
{
var bigString = ( new Array(100000) ).toString() ;

for ( var i = 0 ; i < 100 ; i++ )
{
var tempSpan = document.createElement( 'span' ) ;
tempSpan.innerHTML = bigString ;
}
}

----

Drip will detect leaks for all 100 elements, but the memory consumption will not increase when refreshing it in IE, watching the memory with Process Explorer.

Using Process Explorer, now watching Drip's memory usage, a 1MB memory increase is noticed on every refresh (using the "Go" button).

Now, there would be three possibilities:

- Drip wrongly detecting the leak.
- Drip itself is causing the leak, which it is then correctly detected, but it doesn't really exist in the real world.
- I'm sick, and I'm missing something :)

I really hope the least option is the right one... it would be quicker to fix :)

Discussion

  • Matthias Miller

    Matthias Miller - 2007-08-16

    Logged In: YES
    user_id=1357599
    Originator: NO

    I created a test case and was able to duplicate in Drip 0.5. However, it looks like it's fixed on the trunk.

    Note to self: I badly need to release a new version. :-\

     
  • Matthias Miller

    Matthias Miller - 2007-08-16

    Logged In: YES
    user_id=1357599
    Originator: NO

    Oops, forgot to close.

     
  • Matthias Miller

    Matthias Miller - 2007-08-16
    • status: open --> closed
     
  • Frederico Caldeira Knabben

    Logged In: YES
    user_id=572424
    Originator: YES

    That's great Matthias.

    BTW, I've just noted that this is not a problem with sIEve (I didn't know that it existed until filling this report).

    It is quite confusing having Drip and sIEve sharing the same SF resources, but being released as different projects. Actually, I couldn't understand which one is the most up to date (sIEve I think, as it includes other features). Why not definitely merge your efforts in a single solution? I understand that each one wants to have its own part of the cake, but maybe we are just wasting energy here.

    Anyway... congrats for Drip. It is a terrific program, quite useful for us, JavaScript developers.

     
  • Matthias Miller

    Matthias Miller - 2007-08-16

    Logged In: YES
    user_id=1357599
    Originator: NO

    sIEve was an internal project developed by Cordys, which they graciously contributed to Drip, with the intent of merging its functionality into Drip. Unfortunately, I haven't had much time to work on this project since then.

     
  • Frederico Caldeira Knabben

    Logged In: YES
    user_id=572424
    Originator: YES

    What a pity Matthias...

    Be sure that people out there (like me) would like to have a definitive solution in this sense. Drip is the only "player" in the market, and JavaScript developers (like me) are usually far away from having the full C++ knowledge needed to enhance it, in the same way as C++ developers don't care that much about JavaScript and browsers' related issues. The only thing those developers (like me) can do, is praying to someone come with the perfect solution.

    Don't underestimate Drip. There are hundreds of companies out there that would be willing to have that solution, and probably many of them would be also willing to pay to have it.

    If you think that some money would be the right incentive to you to find more time for Drip, we could discuss further on this. I have used fundable.org in the past with incredible and unexpected success (http://www.fckeditor.net/safari). Just drop me a message.

    In any case... thanks again!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks