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 04-20-2009, 03:39 AM   #12 (permalink)
DGYWFT
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default

Thats what I was saying, is if I load it somewhere else, that just results in a crash because it seems they are both trying to work on that process. But after monitoring and cleaning memory leaks, tweaking code elft and right, I got the ram and leaks all polished and nice now.

So this code works with no problems (for now) at the start of drawRect:


Code:
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
	imagePathB = [prefs stringForKey:@"Image"];
	
	if (imagePathB == nil) {
		NSLog(@"Loaded no Value!");
		[prefs setObject:@"test.png" forKey:@"Image"];
		[prefs synchronize];
		imagePathB = [prefs stringForKey:@"Image"];
		NSLog(@"Drawrect with imagePath = %@", imagePathB);
	}
	
	imagePathB = [prefs stringForKey:@"Image"];
	myUIImage = [UIImage imageNamed:imagePathB];
DGYWFT is offline   Reply With Quote
 

» Advertisements
» Online Users: 433
16 members and 417 guests
apatsufas, ChrisYates, dfvdan, Dimpleppanchal, Duncan C, Gaz, Hamy, itra, jeroenkeij, LegionMD, mehmood.memon, monu_rastogi, mraalex, Paxtorn, Robemtims, smithdale87
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,617
Threads: 94,087
Posts: 402,799
Top Poster: BrianSlick (7,990)
Welcome to our newest member, kellyschoemaker
Powered by vBadvanced CMPS v3.1.0

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