22 #ifndef NDN_CXX_DETAIL_CF_RELEASER_OSX_HPP
23 #define NDN_CXX_DETAIL_CF_RELEASER_OSX_HPP
27 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
28 #error "This file should not be included ..."
31 #include <CoreFoundation/CoreFoundation.h>
65 retain(inReleaser.m_typeRef);
71 if (typeRef != m_typeRef) {
81 retain(inReleaser.m_typeRef);
107 if (typeRef !=
nullptr) {
117 T typeRef = m_typeRef;
125 if (m_typeRef !=
nullptr) {
126 CFRelease(m_typeRef);
135 return lhs.m_typeRef ==
nullptr;
141 return lhs.m_typeRef !=
nullptr;
Helper class to wrap CoreFoundation object pointers.
CFReleaser & operator=(const T &typeRef)
friend bool operator==(const CFReleaser &lhs, std::nullptr_t)
CFReleaser & operator=(const CFReleaser &inReleaser)
CFReleaser(const T &typeRef)
CFReleaser(const CFReleaser &inReleaser)
void retain(const T &typeRef)
friend bool operator!=(const CFReleaser &lhs, std::nullptr_t)
Common includes and macros used throughout the library.