memory leak pickerwheel?

hi

i implement a picker wheel within my app like:

local widget = require( “widget” )

[…code…]

– Create the widget

 local pickerWheel = widget.newPickerWheel

{

    top = display.contentHeight - 522,

    left = 250,

    columns = columnData,

}

    localGroup:insert(pickerWheel)

at the end i try to remove it from memory

        

        display.remove (pickerWheel)

        display.remove (widget)

         pickerWheel:removeSelf();

         widget = nil

         pickerWheel = nil

it disappears from the page, but keeps in memory

usually my memory tested by

    print( "Texture Memory (GamePlay): " … system.getInfo( “textureMemoryUsed” ) )

shows just   4 , but after on time initiating picker wheel it keeps over 540000 used mem

any help???

thx chris

The memory won’t be freed up right away.  It will have to wait until garbage collection runs.  Widget is not a display object so it can’t and shouldn’t be removed.   The widget library is a lua module and it has to be unrequired in a different way, but it’s not contributing significantly to your memory foot print.

If you want to test your memory, do a:  collectgarbage(“collect”) before you print your memory usage.

Rob

Hi Rob,

i tried collectgarbage and it does not change a thing. Still 529876 byte are allocted that i cant release!!

As u did say its a widget…

i tried also widget.newTableView … here its not problem. even without the

collectgarbage, immediatly memory is free again after i do the selfremove.

So i guess its something else !

thx

chris

I just ran a sample based on your code above,  and it does appear to not be freeing up something. 

Can you file a bug report please?  Please make sure to include a config.lua and a build.settings.

Thanks

Rob

hi rob
thx for ur test and reply
i just started to travel. as u already did a test code, and have one.
could u please fill that but report. i would have to create a test code extra and so we avoid double work.

thx chris

Case 30229

The memory won’t be freed up right away.  It will have to wait until garbage collection runs.  Widget is not a display object so it can’t and shouldn’t be removed.   The widget library is a lua module and it has to be unrequired in a different way, but it’s not contributing significantly to your memory foot print.

If you want to test your memory, do a:  collectgarbage(“collect”) before you print your memory usage.

Rob

Hi Rob,

i tried collectgarbage and it does not change a thing. Still 529876 byte are allocted that i cant release!!

As u did say its a widget…

i tried also widget.newTableView … here its not problem. even without the

collectgarbage, immediatly memory is free again after i do the selfremove.

So i guess its something else !

thx

chris

I just ran a sample based on your code above,  and it does appear to not be freeing up something. 

Can you file a bug report please?  Please make sure to include a config.lua and a build.settings.

Thanks

Rob

hi rob
thx for ur test and reply
i just started to travel. as u already did a test code, and have one.
could u please fill that but report. i would have to create a test code extra and so we avoid double work.

thx chris

Case 30229