Menu

DPFImageView - Free ImageIO Memory

auruk
2014-02-14
2014-03-11
  • auruk

    auruk - 2014-02-14

    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

     
  • auruk

    auruk - 2014-02-14

    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.

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-02-14

    Hi auruk

    Where you see this values ? in Instrument ?
    I test it and no memory leak !

    Regards

     
  • auruk

    auruk - 2014-02-24

    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.

     
  • Diego

    Diego - 2014-03-11

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.