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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2009, 08:27 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 1
shinjin.cr is on a distinguished road
Default Working with cached UIImage s

Hi all!

My in-the-making iPhone app is driving me crazy.
I have a custom view hierarchy, managed by a UINavigationController. When the user steps back to a previous view, I release the old view, since it won't be used any longer, and the at the bottom level the views tend to get quite heavy-weight.

But then, when I load a new view of the same kind (but different data), I always run into "EXC_BAD_ACCESS". Debugging revealed the exception is raised when I'm trying to UIImages with a same file as it has been in the unloaded view.
I load the images with [UIImage imageNamed:], and I suppose EXC_BAD_ACCESS comes from the unloading/caching conflict, but I can't really figure out how to resolve it.

(If I don't call release on the old views, sooner or later the app runs out of memory, and I get "EXC_BAD_ACCESS" again)

What is "the nice way" to unload a view, or how can I check if the cache for an image is still valid? (or even better, how can I get the framework to do this automatically for me?)

Thanks,
shinjin
shinjin.cr is offline   Reply With Quote
Reply

Bookmarks

Tags
cache, exc_bad_access, uiimage

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 317
12 members and 305 guests
chiataytuday, coolman, givensur, glenn_sayers, guusleijsten, jbro, mediaspree, mottdog, mtl_tech_guy, Punkjumper, vilisei, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:24 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0