I am having this part of code that gives me major memory leak: SBitmapImageRep* textRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:(NSInteger)frameSize.width pixelsHigh:(NSInteger)frameSize.height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0]; [textRep setSize: frameSize];
NSGraphicsContext* newContext = [NSGraphicsContext graphicsContextWithBitmapImageRep:textRep]; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:newContext]; // // // Some drawing with openGL // // [NSGraphicsContext restoreGraphicsState]; [textRep release]; [newContext release]; What am I forgetting? [cid:image001.jpg@01CF2596.482CA040] Dany Golubitsky Software Engineer Waves Audio Ltd Tel: +972 3 608 4157 www.waves.com<http://www.waves.com/> www.maxx.com<http://www.maxx.com/> www.sound.org<http://www.sound.org/> www.waveslive.com<http://www.waveslive.com/>
<<inline: image001.jpg>>
_______________________________________________ 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