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 zfobjReleaseInScope(obj)
 release the object after nearest block
 
#define zfunsafe_zfobjReleaseInScope(obj)
 no lock version of zfobjReleaseInScope, use with caution
 

Detailed Description

smart pointer for ZFObject

Macro Definition Documentation

◆ zfobjReleaseInScope

#define zfobjReleaseInScope ( obj)

release the object after nearest block

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