alstrup / arctic

Automatically exported from code.google.com/p/arctic
0 stars 0 forks source link

movie leak with Arctic.makeTooltip #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using of the Arctic.makeTooltip leads to movie leak. 

The problem arises after line 1962 :

         cursor = block;

The solution:

the lines 
// Since cursors are constructed lazily, we have to search for our child 
// because other Cursors might have gone before us changing the child numbering
for (i in 0...parent.numChildren) {
    var c : Dynamic = parent.getChildAt(i);
    if (c == cursorMc.clip) {
        build(cursor, parent, 0, 0, mode, i);
        break;
    }
}

have to be changed to 

// Since cursors are constructed lazily, we have to search for our child 
// because other Cursors might have gone before us changing the child numbering
for (i in 0...parent.numChildren) {
    var c : Dynamic = parent.getChildAt(i);
    if (c == cursorMc.clip) {
        switch (cursor) {
            case Offset(dx, dy, block) :
                build(block, parent, 0, 0, mode, i);
            default:
                break;
        }                           
        break;
    }
}

Original issue reported on code.google.com by fov...@gmail.com on 6 Jun 2011 at 4:13