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: CGShadingCreateAxial retains CGFunctionRef?



Thanks for the quick response - but...
I'm really wondering if the retaining (or not) is guaranteed by CGShadingCreateAxial and so won't break in future (or earlier) versions of Quartz, or if the behaviour is undefined, in which case I'll retain it myself. As it's not mentioned in the documentation, I guess I should consider it undefined...just hoped somebody might have read something more specific elsewhere that I had missed.



On 15 Jun 2005, at 14:09, Steve Mills wrote:

On Jun 15, 2005, at 07:42, Tom Butterworth wrote:


The docs for CGShadingCreateAxial don't mention if the CGFunctionRef passed to it is retained by the shading or not.

At the moment (10.4.1) it seems that CGShadingCreateAxial is retaining the CGFunctionRef (or only using it before the create function returns), as I can release it after passing it to CGShadingCreateAxial and everything behaves. Is this behaviour guaranteed, or just an aspect of the current implementation?


Whenever this question pops up, just check the ref count (I'm fairly sure CFGetRetainCount works for all CG*Ref types) before and after you pass a ref to some routine that takes a ref. If it goes up by one (or maybe even more for some reason), then it should be safe to release it.


_________________________________________________________
Steve Mills                              Me: 952-401-6255
Senior Software Architect                         MultiAd
email@hidden                       www.multi-ad.com


_______________________________________________ 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




_______________________________________________ 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: 
 >CGShadingCreateAxial retains CGFunctionRef? (From: Tom Butterworth <email@hidden>)
 >Re: CGShadingCreateAxial retains CGFunctionRef? (From: "Steve Mills" <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.