Issues in fixing Memory Leaks

Discussion in 'iOS Programming' started by sanjeev, Mar 2, 2010.

  1. sanjeev macrumors newbie

    Dec 18, 2009
    Hello Friends,

    I am using lots of images in my application. When I run it on 3.1 device, its working fine but If I try to run the app. on 3.0 device, after 10-12 times, the images got invisible from some views.

    I have used UIImage ImageNamed for passing the image.

    I was googling for this and I found that by using ImageNamed, the app. caches the images and does not release it. Instead of this use "imagewithContentsofFile".

    Can anyone please guide how to use "imagewithContentsofFile" accurately instead of ImageNamed.

    Thanks in Advance.

  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    What, exactly, are you having trouble with when you are using imageWithContentsOfFile:? Use the methods in NSBundle to get the path to the resource and away you go...

Share This Page