Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing a Layer and It's Context



On Jun 22, 2005, at 12:05 PM, Nick Nallick wrote:

On Jun 22, 2005, at 12:37 PM, Scott Thompson wrote:

The routine CGLayerGetContext is a "Get" routine. You are not responsible for releasing something that comes from a "Get" method (only "Copy" or "Create").

Remove the call to CGContextRelease.


That's a good point, but I'll then submit that the documentation is misleading. From the description of CGLayerGetContext() at http:// developer.apple.com/documentation/GraphicsImaging/Reference/CGLayer/ cglayer_reference/chapter_1.2_section_5.html



function result
The graphics context associated with the layer. You are responsible for releasing this object when you no longer need it.



To me this implies I should release the context.

You should not release the context. This is a bug in the documentation which we should fix. It would be helpful if you filed a bug.


Thanks,

Derek

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden
References: 
 >Releasing a Layer and It's Context (From: Nick Nallick <email@hidden>)
 >Re: Releasing a Layer and It's Context (From: Scott Thompson <email@hidden>)
 >Re: Releasing a Layer and It's Context (From: Nick Nallick <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.