12 #ifndef __ICEMEMORYMACROS_H__ 13 #define __ICEMEMORYMACROS_H__ 57 #if defined(_MSC_VER) && not defined(_WIN64) 69 while(nb--) *dest++ =
value;
93 #define SIZEOFOBJECT sizeof(*this) 94 //#define CLEAROBJECT { memset(this, 0, SIZEOFOBJECT); } 95 #define DELETESINGLE(x) if (x) { delete x; x = null; } 96 #define DELETEARRAY(x) if (x) { delete []x; x = null; } 97 #define SAFE_RELEASE(x) if (x) { (x)->Release(); (x) = null; } 98 #define SAFE_DESTRUCT(x) if (x) { (x)->SelfDestruct(); (x) = null; } 100 #ifdef __ICEERROR_H__ 101 #define CHECKALLOC(x) if(!x) return SetIceError("Out of memory.", EC_OUT_OF_MEMORY); 103 #define CHECKALLOC(x) if(!x) return false; 107 #define SAFE_ALLOC(ptr, type, count) DELETEARRAY(ptr); ptr = new type[count]; CHECKALLOC(ptr); 109 #endif // __ICEMEMORYMACROS_H__ inline_ void StoreDwords(udword *dest, udword nb, udword value)
inline_ void FillMemory(void *dest, udword size, ubyte val)
unsigned int udword
sizeof(udword) must be 4
unsigned char ubyte
sizeof(ubyte) must be 1
inline_ void CopyMemory(void *dest, const void *src, udword size)
inline_ void ZeroMemory(void *addr, udword size)
inline_ void MoveMemory(void *dest, const void *src, udword size)