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

utilities for ZFFramework More...

#include "ZFCoreTypeDef.h"

Go to the source code of this file.

Macros

#define zflineFree(obj)
 util macro to free a POD after line end
 
#define zfblockedFree(obj)
 util macro to make a POD object automatically deleted after code block, using zffree
 
#define zflineDelete(obj)
 util macro to delete a object after line end
 
#define zfblockedDelete(obj)
 util macro to make a non-ZFObject object automatically deleted after code block, using zfdelete
 
#define zfblockedCleanup_1(action, P0, p0)
 util to perform custom cleanup action after code block
 
#define zfblockedCleanup_2(action, P0, p0, P1, p1)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_3(action, P0, p0, P1, p1, P2, p2)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_4(action, P0, p0, P1, p1, P2, p2, P3, p3)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_5(action, P0, p0, P1, p1, P2, p2, P3, p3, P4, p4)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_6(action, P0, p0, P1, p1, P2, p2, P3, p3, P4, p4, P5, p5)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_7(action, P0, p0, P1, p1, P2, p2, P3, p3, P4, p4, P5, p5, P6, p6)
 see zfblockedCleanup_1
 
#define zfblockedCleanup_8(action, P0, p0, P1, p1, P2, p2, P3, p3, P4, p4, P5, p5, P6, p6, P7, p7)
 see zfblockedCleanup_1
 

Detailed Description

utilities for ZFFramework

Macro Definition Documentation

◆ zfblockedFree

#define zfblockedFree ( obj)

util macro to make a POD object automatically deleted after code block, using zffree

usage:

{ // code block
zfbyte *buf = (zfbyte *)zfmalloc(size);
zfblockedFree(buf); // must be placed in single line
} // buf would be released by #zffree after code block
#define zfmalloc(size)
same as malloc defined for future use
Definition ZFCoreTypeDef_ClassType.h:100
_ZFT_t_zfbyte zfbyte
8-bit unsigned value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:194
#define zfblockedFree(obj)
util macro to make a POD object automatically deleted after code block, using zffree
Definition ZFCoreUtilAutoPtr.h:57

◆ zfblockedDelete

#define zfblockedDelete ( obj)

util macro to make a non-ZFObject object automatically deleted after code block, using zfdelete

usage:

{ // code block
NonePODObject *obj = zfnew(NonePODObject);
zfblockedDelete(obj); // must be placed in single line
} // buf would be released by #zfdelete after code block
#define zfnew(Type,...)
same as new defined for future use
Definition ZFCoreTypeDef_ClassType.h:89
#define zfblockedDelete(obj)
util macro to make a non-ZFObject object automatically deleted after code block, using zfdelete
Definition ZFCoreUtilAutoPtr.h:121