Go to the documentation of this file.
17 #ifndef __LOCALPOINTER_H__
18 #define __LOCALPOINTER_H__
41 #if U_SHOW_CPLUSPLUS_API
97 bool operator==(
const T *other)
const {
return ptr==other; }
160 static void * U_EXPORT2
operator new(
size_t size);
161 static void * U_EXPORT2
operator new[](
size_t size);
162 #if U_HAVE_PLACEMENT_NEW
163 static void * U_EXPORT2
operator new(size_t,
void *ptr);
290 #define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction) \
291 class LocalPointerClassName : public LocalPointerBase<Type> { \
293 explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase<Type>(p) {} \
294 ~LocalPointerClassName() { closeFunction(ptr); } \
295 void adoptInstead(Type *p) { \
296 closeFunction(ptr); \