// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifndef _WX_COCOA_OBJCREF_H__
+#define _WX_COCOA_OBJCREF_H__
/*
wxObjcAutoRefFromAlloc: construct a reference to an object that was
[NSObject -alloc]'ed and thus does not need a retain
{
protected:
static struct objc_object* ObjcRetain(struct objc_object*);
- static struct objc_object* ObjcRelease(struct objc_object*);
+ static void ObjcRelease(struct objc_object*);
};
// T should be a pointer like NSObject*
public:
wxObjcAutoRef(T p = 0)
: wxObjcAutoRefFromAlloc<T>(p)
- { ObjcRetain(m_ptr); }
+ { ObjcRetain(wxObjcAutoRefFromAlloc<T>::m_ptr); }
~wxObjcAutoRef() {}
wxObjcAutoRef(const wxObjcAutoRef& otherRef)
: wxObjcAutoRefFromAlloc<T>(otherRef)
{ return wxObjcAutoRefFromAlloc<T>::operator=(otherRef); }
};
+#endif //ndef _WX_COCOA_OBJCREF_H__