22 #ifndef NDN_UTIL_CF_RELEASER_OSX_HPP 23 #define NDN_UTIL_CF_RELEASER_OSX_HPP 25 #include "../common.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);
106 return m_typeRef ==
nullptr;
112 return m_typeRef !=
nullptr;
119 if (typeRef !=
nullptr) {
129 T typeRef = m_typeRef;
137 if (m_typeRef !=
nullptr) {
138 CFRelease(m_typeRef);
150 #endif // NDN_UTIL_CF_RELEASER_OSX_HPP bool operator!=(const std::nullptr_t &)
Copyright (c) 2013-2017 Regents of the University of California.
CFReleaser(const T &typeRef)
CFReleaser & operator=(const T &typeRef)
Helper class to wrap CoreFoundation object pointers.
CFReleaser(const CFReleaser &inReleaser)
CFReleaser & operator=(const CFReleaser &inReleaser)
void retain(const T &typeRef)
bool operator==(const std::nullptr_t &)