If the context is created, and the init succeeds and returns a valid self, then you are leaking the context. Get rid of the 'else', since it causes the code to skip over the release.
On Aug 23, 2013, at 7:27 AM, Kevin Meaney <k...@yvs.eu.com> wrote: > Hi, > > I'm using ARC and using Mavdacted and DP5 but I don't think this is related > to anything under NDA. The static analyzer is complaining about the following: > > -(instancetype)initWithPreset:(NSString *)preset size:(CGPoint)size > { > CGContextRef context = CreateCGBitmapContextFromPresetSize(preset, > size); > if (!context) > self = NULL; > > if (self) > self = [super initWithCGContent:context > > baseObjectType:MMCGBitmapContextKey]; > if (self) > _preset = preset; > else > { > if (context) > CGContextRelease(context); > } > return self; > } _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com