LL.createImage(width,height) returns null in latest version. (For big width and height)

LL.createImage(width,height) returns null in latest version. (For big width and height)

]]>

10 Commentsto LL.createImage(width,height) returns null in latest version. (For big width and height)

  1. Anonymous says:

    < ![CDATA[

    It seems that this happens only if done repeatedly… (Maybe images are not released correctly?)

    ]]>

  2. Anonymous says:

    < ![CDATA[

    If the app run out of memory, then it means that a reference to the bitmap is kept somewhre. The createImage function does not keep a reference itself, so this means that a reference is kept elsewhere by the caller. JavaScript is known to retain a lot of references due to closures. Could you share your script (or a fragment to isolate the leak) ?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    function screenshot(){


        var view=d.getView();


        var img=LL.createImage(view.getWidth(),view.getHeight());


        var c=img.draw();


        view.draw(c);


        return img.getBitmap();


    }

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Where d is a desktop.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    So it depends on what you do with the result of screenshot(). But yes, if d is a desktop, these images will rapidly consume a lot of memory.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    I’m now manually recycling the bitmap after use, it helps a lot.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    If you can recycle them without a crash then it also means the bitmap is not drawn anymore but that probably means also that the reference is still kept somewhere: it will leak a lot less memory, but the leak is still here. If you need more investigations I can use tools to look for leaks.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Is it possible to free (like in C) a reference, or to unlink all reference of an object? (so it can just be deleted from memory)

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Special for bitmaps there is a specific call: bitmap.recycle()

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Benoît de Chezelles no

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *