Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-22-2008, 07:01 PM   #1 (permalink)
LibraF
New Member
 
Join Date: Dec 2008
Posts: 1
LibraF is on a distinguished road
Default Memory issues when displaying images

Hi all,

I'm trying to run an animation by changing the images of my UIImageView at a 20 fps rate. I need about 100 images of 24K to create a 5 sec animation. I am able to load all the images into the memory (into an NSArray), but when I start the animation (switching the UIImage of the UIImageView) - after about 60 images I get a memory warning and if I continue displaying images the app crashes.

I have tried several ways to load the images - first was imageNamed which turned out to cache all images into the memory hence couldn't load more than about 40 images, and after that tried using initWithContentsOfFile (which doesn't cache the images) which helped in loading all the images to the memory, but still when i animated them it caused memory problems and eventually a crash.

I think I'm doing something wrong... these are the main areas I'm not sure about:
1. how come displaying an image (24K) that was already loaded into memory (and not cached) takes about 200ms? What's the fastest way to display an already loaded image?
2. Is there some kind of a display memory that is different from the RAM (like on a graphic card or something) that can be cleared on demand/increased?
3. Any general suggestions as for how to run the animation better?

I'm really lost here so any help would be appreciated, Thanks
LibraF is offline   Reply With Quote
 

» Advertisements
» Online Users: 429
13 members and 416 guests
casgali78, dansparrow, emathew, freewind, gogoman, gwelmarten, jeroenkeij, logan, QuantumDoja, QuillGames, Sami Gh, smashing, zulemamn37
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,606
Threads: 94,084
Posts: 402,783
Top Poster: BrianSlick (7,990)
Welcome to our newest member, casgali78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.