diff --git a/include/wx/cocoa/ObjcRef.h b/include/wx/cocoa/ObjcRef.h index 4e28712e89..faa11bea36 100644 --- a/include/wx/cocoa/ObjcRef.h +++ b/include/wx/cocoa/ObjcRef.h @@ -25,7 +25,7 @@ class wxObjcAutoRefBase { 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* diff --git a/src/cocoa/ObjcRef.mm b/src/cocoa/ObjcRef.mm index ace3567500..6bff7b69c9 100644 --- a/src/cocoa/ObjcRef.mm +++ b/src/cocoa/ObjcRef.mm @@ -18,8 +18,8 @@ return [obj retain]; } -/*static*/ struct objc_object* wxObjcAutoRefBase::ObjcRelease(struct objc_object* obj) +/*static*/ void wxObjcAutoRefBase::ObjcRelease(struct objc_object* obj) { - return [obj release]; + [obj release]; }