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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-08-2009, 11:29 AM   #3 (permalink)
teras
Registered Member
 
Join Date: Aug 2008
Posts: 18
Default

I have some problems with memory management.

I thought to use the init- messages instead, like this:
Code:
	NSData * data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:myURL]];
	UIImage *img = [[UIImage alloc] initWithData:data];
	[myImageView setImage:img];
	[img dealloc];
	[data dealloc];
If I use it like this, when code reaches [data dealloc] it segfaults.

Why is this happening?
teras is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,668
Threads: 89,155
Posts: 380,379
Top Poster: BrianSlick (7,110)
Welcome to our newest member, dhainiuloxi
Powered by vBadvanced CMPS v3.1.0

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