X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd9cd37f6629d45afd7196c556229e94046b6650..e0062c047ecb5a7d4790b980777dfa70869f4834:/include/wx/mac/corefoundation/cfref.h diff --git a/include/wx/mac/corefoundation/cfref.h b/include/wx/mac/corefoundation/cfref.h index cabf81e616..7506791c0f 100644 --- a/include/wx/mac/corefoundation/cfref.h +++ b/include/wx/mac/corefoundation/cfref.h @@ -21,11 +21,14 @@ /*! @function wxCFRelease @abstract A CFRelease variant that checks for NULL before releasing. + @discussion The parameter is template not for type safety but to ensure the argument + is a raw pointer and not a ref holder of any type. */ -inline void wxCFRelease(CFTypeRef r) +template +inline void wxCFRelease(Type *r) { if ( r != NULL ) - ::CFRelease(r); + ::CFRelease((CFTypeRef)r); } /*! @function wxCFRetain