Clapkit
Loading...
Searching...
No Matches
Memory

Memory (and memory debugging) related functions. More...

Macros

#define CKMalloc(sz)   __CKMalloc(__func__, __LINE__, __FILENAME__, (sz))
 Use instead of malloc.
 
#define CKFree(ptr)   __CKFree(__func__, __LINE__, __FILENAME__, (ptr))
 Use instead of free.
 
#define CKNew   new (__func__, __LINE__, __FILENAME__)
 Use instead of new.
 
#define CKDelete(ptr)   __CKDestroy(ptr, __FILENAME__, __func__, __LINE__)
 Use instead of delete.
 
#define CKSafeCopyString(dest, src)   __CKSafeCopyString(&dest, src, __func__, __LINE__, __FILENAME__)
 Copy a string (if it is a string) to a destination. Free the destination if there is already something there.
 

Detailed Description

Memory (and memory debugging) related functions.

Macro Definition Documentation

◆ CKDelete

#define CKDelete (   ptr)    __CKDestroy(ptr, __FILENAME__, __func__, __LINE__)

Use instead of delete.

◆ CKFree

#define CKFree (   ptr)    __CKFree(__func__, __LINE__, __FILENAME__, (ptr))

Use instead of free.

◆ CKMalloc

#define CKMalloc (   sz)    __CKMalloc(__func__, __LINE__, __FILENAME__, (sz))

Use instead of malloc.

◆ CKNew

#define CKNew   new (__func__, __LINE__, __FILENAME__)

Use instead of new.

◆ CKSafeCopyString

#define CKSafeCopyString (   dest,
  src 
)    __CKSafeCopyString(&dest, src, __func__, __LINE__, __FILENAME__)

Copy a string (if it is a string) to a destination. Free the destination if there is already something there.

Parameters
dest
src
Returns
True on success