mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Comment about obsolete RETAIN/RELEASE/AUTORELEASE etc being deprecated
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34697 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b6497999a6
commit
e7edb88bde
1 changed files with 24 additions and 8 deletions
|
@ -71,21 +71,27 @@
|
|||
|
||||
#ifndef RETAIN
|
||||
/**
|
||||
* Basic retain operation ... calls [NSObject-retain]
|
||||
* Basic retain operation ... calls [NSObject-retain]<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -retain method.
|
||||
*/
|
||||
#define RETAIN(object) [(object) retain]
|
||||
#endif
|
||||
|
||||
#ifndef RELEASE
|
||||
/**
|
||||
* Basic release operation ... calls [NSObject-release]
|
||||
* Basic release operation ... calls [NSObject-release]<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -release method.
|
||||
*/
|
||||
#define RELEASE(object) [(object) release]
|
||||
#endif
|
||||
|
||||
#ifndef AUTORELEASE
|
||||
/**
|
||||
* Basic autorelease operation ... calls [NSObject-autorelease]
|
||||
* Basic autorelease operation ... calls [NSObject-autorelease]<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -autorelease method.
|
||||
*/
|
||||
#define AUTORELEASE(object) [(object) autorelease]
|
||||
#endif
|
||||
|
@ -93,23 +99,31 @@
|
|||
#ifndef TEST_RETAIN
|
||||
/**
|
||||
* Tested retain - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
* objective-c method if the receiver is not nil.<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -retain method.
|
||||
*/
|
||||
#define TEST_RETAIN(object) ({\
|
||||
id __object = (object); (__object != nil) ? [__object retain] : nil; })
|
||||
#endif
|
||||
|
||||
#ifndef TEST_RELEASE
|
||||
/**
|
||||
* Tested release - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
* objective-c method if the receiver is not nil.<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -release method.
|
||||
*/
|
||||
#define TEST_RELEASE(object) ({\
|
||||
id __object = (object); if (__object != nil) [__object release]; })
|
||||
#endif
|
||||
|
||||
#ifndef TEST_AUTORELEASE
|
||||
/**
|
||||
* Tested autorelease - only invoke the
|
||||
* objective-c method if the receiver is not nil.
|
||||
* objective-c method if the receiver is not nil.<br />
|
||||
* Deprecated ... pointless on modern processors.
|
||||
* Simply call the -autorelease method.
|
||||
*/
|
||||
#define TEST_AUTORELEASE(object) ({\
|
||||
id __object = (object); (__object != nil) ? [__object autorelease] : nil; })
|
||||
|
@ -118,7 +132,8 @@ id __object = (object); (__object != nil) ? [__object autorelease] : nil; })
|
|||
#ifndef ASSIGN
|
||||
/**
|
||||
* ASSIGN(object,value) assigns the value to the object with
|
||||
* appropriate retain and release operations.
|
||||
* appropriate retain and release operations.<br />
|
||||
* Use this to avoid retain/release errors.
|
||||
*/
|
||||
#define ASSIGN(object,value) ({\
|
||||
id __object = object; \
|
||||
|
@ -130,7 +145,8 @@ id __object = (object); (__object != nil) ? [__object autorelease] : nil; })
|
|||
#ifndef ASSIGNCOPY
|
||||
/**
|
||||
* ASSIGNCOPY(object,value) assigns a copy of the value to the object
|
||||
* with release of the original.
|
||||
* with release of the original.<br />
|
||||
* Use this to avoid retain/release errors.
|
||||
*/
|
||||
#define ASSIGNCOPY(object,value) ({\
|
||||
id __object = object; \
|
||||
|
|
Loading…
Reference in a new issue