Hi there
I have a program which uses a scrollable large panel with a large background-image stored in sd card.
It is OK when the program initialize panel for the first time with its background.
But the background image changes with DrawBitmap, programatically and it has to refresh background image after it changes. (Average size of background-image ≈ 200KB )
It works also fine for first 2-3 refreshes but after that it crashes with Out of memory error.
Does device keep first image files even after re-initializing image with new ones? If yes is there any way of helping device to forget first image files to free the memory?
I have a program which uses a scrollable large panel with a large background-image stored in sd card.
It is OK when the program initialize panel for the first time with its background.
But the background image changes with DrawBitmap, programatically and it has to refresh background image after it changes. (Average size of background-image ≈ 200KB )
It works also fine for first 2-3 refreshes but after that it crashes with Out of memory error.
Does device keep first image files even after re-initializing image with new ones? If yes is there any way of helping device to forget first image files to free the memory?
B4X:
Sub RefreshPanel
paneloFullBgImg.InitializeSample(File.DirRootExternal , "/myapps/temp/bg.png",800%x,50%y)
panelo.SetBackgroundImage(paneloFullBgImg)
End Sub
Last edited: