6#ifndef _ZFI_ZFAutoReleasePool_h_
7#define _ZFI_ZFAutoReleasePool_h_
72 if(d.count() > count) {
75 tmp.
addFrom(d.arrayBuf(), d.count() - count);
76 d.remove(0, d.count() - count);
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define ZFCoreAssertWithMessage(exp, fmt,...)
ZFCoreAssert with custom message
Definition ZFCoreLog_CommonLog.h:70
#define ZFCoreMutexLocker()
util method to lock current block
Definition ZFCoreMutex.h:95
#define ZFCoreMutexUnlock()
see ZFCoreMutexLock
Definition ZFCoreMutex.h:58
#define ZFCoreMutexLock()
internal use only
Definition ZFCoreMutex.h:51
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:198
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:214
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
ZFObject related include.
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:122
#define ZFOBJECT_SINGLETON_DECLARE(AccessTypeName, accessMethodName)
util macro to declare a singleton instance access for ZFObject type
Definition ZFObjectGlobalInstance.h:243
#define zfobjRelease(obj)
release an object, see ZFObject
Definition ZFObjectRetain.h:145
void poolDrain(zfindex count)
manually drain a pool, all object in the pool would be released immediately
Definition ZFAutoReleasePool.h:71
void poolDrain()
manually drain a pool, all object in the pool would be released immediately
Definition ZFAutoReleasePool.h:54
void poolAdd(ZFObject *obj)
add an object which would be auto released upon pool's drain or delete
Definition ZFAutoReleasePool.h:42
zfindex poolCount(void)
current object count
Definition ZFAutoReleasePool.h:87
static ZFAutoReleasePool * instance()
global memory pool, you should drain it manually and you take full responsibility to keep it safe to ...
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
virtual void objectOnDeallocPrepare(void)
called before objectOnDealloc, safe to call virtual functions here
light weight array
Definition ZFCoreArray.h:297
void swap(ZFCoreArray< T_Element > &ref)
swap internal data
Definition ZFCoreArray.h:381
void addFrom(const T_Element *src, zfindex count)
add elements, src can be part of this array's buffer
Definition ZFCoreArray.h:556
virtual zfindex count(void) const
element count of this array
Definition ZFCoreArray.h:903