David Elliott
64dfdfa28b
Improve static_cfref_cast so that it can be used without causing an unnecessary retain/release in the case when one is only using the cast to convert to a more-derived raw CF ref type.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-12 20:03:20 +00:00
David Elliott
9ed8b5a7b2
Don't include <CoreFoundation/CFBase.h> because it in turn includes MacTypes.h which causes too much namespace pollution.
...
Instead, declare the CFTypeRef type and the CFRelease and CFRetain functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-07 22:10:02 +00:00
David Elliott
6972616433
Make wxCFRef take a template raw pointer parameter instead of CFTypeRef to ensure it does not get called with a ref holder.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-12 19:30:09 +00:00
David Elliott
fd9cd37f66
Implement NULL-checking wxCFRetain/wxCFRelease as suggested by Stefan Csomor.
...
Use wxCFRetain/wxCFRelease in wxCFRef where needed.
Use .get() to access m_ptr of a different wxCFRef instantiation instead of making them friends.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-12 19:22:53 +00:00
David Elliott
b4e0eabd78
Added cfref.h containing wxCFRef templated CF ref holding class and related functions.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-12 18:55:58 +00:00