View Full Version : Issues in fixing Memory Leaks

Mar 2, 2010, 06:12 AM
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.


Mar 2, 2010, 07:34 AM
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...