• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: nil there not here
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nil there not here


  • Subject: Re: nil there not here
  • From: David Duncan <email@hidden>
  • Date: Tue, 28 Jul 2009 10:37:53 -0700

On Jul 27, 2009, at 2:44 PM, David Blanton wrote:

context = CGBitmapContextCreate (bitmap.m_array, bitmap.m_pixelsx, bitmap.m_pixelsy, 8, bitmap.m_pixelsx * 4, colorSpace, kCGImageAlphaNoneSkipFirst|kCGBitmapByteOrder32Host);
CGImageRelease(_myDocumentView->_cgImageRef);
_myDocumentView->_cgImageRef = CGBitmapContextCreateImage (context);
CGImageRetain(_myDocumentView->_cgImageRef);
CGContextRelease(context);
CGColorSpaceRelease(colorSpace);


This is also over-retaining the CGImage. However you may want to consider creating a CGImage directly instead of going through a bitmap context, as this gives you more flexibility in what types of image data you can represent, as well as avoiding a trip through the kernel to mark the memory for the bitmap context as copy-on-write.
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >nil there not here (From: David Blanton <email@hidden>)

  • Prev by Date: Re: Panning a View
  • Next by Date: Re: Panning a View
  • Previous by thread: Re: nil there not here
  • Next by thread: Re: nil there not here
  • Index(es):
    • Date
    • Thread