ZFFramework
 
Loading...
Searching...
No Matches
ZFObjectAutoPtr.h File Reference

smart pointer for ZFObject More...

#include "ZFObjectRetain.h"
#include "zfauto.h"

Go to the source code of this file.

Classes

class  ZFCorePointerForZFObject< T_Pointer >
 see ZFCorePointerT More...
 
class  zfobj< T_ZFObjectBase >
 util class to alloc and hold ZFObject type More...
 

Macros

#define zfscopeRelease(obj)
 release the object after nearest block
 
#define zfunsafe_zfscopeRelease(obj)
 no lock version of zfscopeRelease, use with caution
 

Detailed Description

smart pointer for ZFObject

Macro Definition Documentation

◆ zfscopeRelease

#define zfscopeRelease ( obj)

release the object after nearest block

{ // code block
ZFObject *obj = ...;
zfscopeRelease(obj); // mark release, must be single line
return; // safe to return, auto released after exiting code block
} // obj would be released after here
#define zfscopeRelease(obj)
release the object after nearest block
Definition ZFObjectAutoPtr.h:59
base class of all objects
Definition ZFObjectCore.h:205