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 10-23-2008, 11:25 AM   #11 (permalink)
tgersic
New Member
 
Join Date: Oct 2008
Posts: 7
Default

You're correct. Leaks does not report it as a leak. It's just memory that is never freed. What I've found is this:

After this line...

Code:
CGImageRef	ref = CGBitmapContextCreateImage(bitmap);
...ref has a retain count of 1. But after the next line...

Code:
UIImage*	result = [UIImage imageWithCGImage:ref];
...ref has a retain count of 2. I'm not really sure why. The obvious answer of calling CGImageRelease twice to bring the retain count down to 0 causes an EXC_BAD_ACCESS later when I try to access the returned image. I think that may be what you were trying to handle with the autorelease above, which I just tried, but I don't think CGImageRef is autoreleaseable, so no dice...

Thanks,
Tom
tgersic is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,870
Threads: 89,225
Posts: 380,694
Top Poster: BrianSlick (7,129)
Welcome to our newest member, triclopus
Powered by vBadvanced CMPS v3.1.0

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