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?



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
References: 
 >CGShadingCreateAxial retains CGFunctionRef? (From: Tom Butterworth <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.