I have a ScrollView and in runtime i add UIViews with ImageViews.
Next i run the simulator and Instruments app with memory leaks option.
I have ScrollView empty. --> VM: ImageIO_JPEG_Data = 0MB
I add 20 Images to ScrollView. --> VM: ImageIO_JPEG_Data = 14MB
I remove SrollView elements with DeleteAllControls --> VM: ImageIO_JPEG_Data = 14MB
I add 2o Images to ScrollView. --> VM: ImageIO_JPEG_Data = 28MB
...
As you can see, DeleteAllControls not free ImageIO memory. I tried with ClearImage in each ImageView, but the same happen.
How do i have delete subviews of ScrollViews to free ImageIO memory?
Have ImageView a procedure to clear image and free ImageIO memory until i assign new image?
Thanks for all
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried now with the TableView Frame demo approach.
Apply a Frame with a ImageView to a TableView.
I load 100 rows. --> VM: ImageIO_JPEG_Data = 10MB
Scroll a little. --> VM: ImageIO_JPEG_Data = 15MB
Scroll to bottom. --> VM: ImageIO_JPEG_Data = 100MB.
If i not wrong, TableView free memory when row not visible. In this case is freeying memory but not ImageIO memory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the absence, i now finde the mistake, whe i run the app in simulator, memory compsumition grow to more than 1GB and free it when needed, for this i'm thinking the app not freeying memory. But all work perfectly.
Thanks for all.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I have a ScrollView and in runtime i add UIViews with ImageViews.
Next i run the simulator and Instruments app with memory leaks option.
I have ScrollView empty. --> VM: ImageIO_JPEG_Data = 0MB
I add 20 Images to ScrollView. --> VM: ImageIO_JPEG_Data = 14MB
I remove SrollView elements with DeleteAllControls --> VM: ImageIO_JPEG_Data = 14MB
I add 2o Images to ScrollView. --> VM: ImageIO_JPEG_Data = 28MB
...
As you can see, DeleteAllControls not free ImageIO memory. I tried with ClearImage in each ImageView, but the same happen.
How do i have delete subviews of ScrollViews to free ImageIO memory?
Have ImageView a procedure to clear image and free ImageIO memory until i assign new image?
Thanks for all
I tried now with the TableView Frame demo approach.
Apply a Frame with a ImageView to a TableView.
I load 100 rows. --> VM: ImageIO_JPEG_Data = 10MB
Scroll a little. --> VM: ImageIO_JPEG_Data = 15MB
Scroll to bottom. --> VM: ImageIO_JPEG_Data = 100MB.
If i not wrong, TableView free memory when row not visible. In this case is freeying memory but not ImageIO memory.
Hi auruk
Where you see this values ? in Instrument ?
I test it and no memory leak !
Regards
Hi Babak,
Sorry for the absence, i now finde the mistake, whe i run the app in simulator, memory compsumition grow to more than 1GB and free it when needed, for this i'm thinking the app not freeying memory. But all work perfectly.
Thanks for all.
Hi auruk:
I think I am on the same situation as you.
Take a look at this ticket:
https://sourceforge.net/p/dpfdelphiios/tickets/238/
Maybe in simulator is not a problem, but in real devices, the app eventually will get crashed with "Memory out" error.
I have uploaded a little demo where you can check it.