Re: CoreImage: Newbie can't find memory leak [SOLVED
Re: CoreImage: Newbie can't find memory leak [SOLVED
- Subject: Re: CoreImage: Newbie can't find memory leak [SOLVED
- From: Erik Buck <email@hidden>
- Date: Tue, 14 Feb 2006 20:46:38 -0500
I don't think you have solved your problem!
+ (CIImage *)compositeImage : (CIImage *)aImage
overlayingImage : (CIImage *)overlayImage
{
CIFilter *f = [CIFilter filterWithName:@"CIMaximumCompositing"];
[f setValue:aImage forKey:@"inputBackgroundImage"];
[f setValue:overlayImage forKey:@"inputImage"];
CIImage *returnImage = [f valueForKey:@"outputImage"];
[overlayImage release];
[aImage release];
return returnImage;
}
You did not allocate aImage or overlayImage IN THIS METHOD.
Therefore you should not release or autorlease aImage or overlayImage
IN THIS METHOD.
Balance all alloc/copy/retain with relaes/autorlease in a single
method. Do not do what you show above.
How was aImage allocated and where. When you find that place, if it
is in your code, you need to release or autorelease it THERE. The
same goes for overlayImage.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden