Data Structures | |
struct | _Eina_Trash |
Type for a generic container of unused allocated pointer. More... | |
Macros | |
#define | EINA_TRASH_CLEAN(trash, data) while ((data = eina_trash_pop(trash))) |
Macro to remove all pointer from the trash. More... | |
Typedefs | |
typedef struct _Eina_Trash | Eina_Trash |
Type for a generic container of unused allocated pointer. | |
Functions | |
static void | eina_trash_init (Eina_Trash **trash) |
static void | eina_trash_push (Eina_Trash **trash, void *data) |
static void * | eina_trash_pop (Eina_Trash **trash) |
#define EINA_TRASH_CLEAN | ( | trash, | |
data | |||
) | while ((data = eina_trash_pop(trash))) |
Macro to remove all pointer from the trash.
trash | The trash to clean. |
data | The pointer extracted from the trash. |
This macro allow the cleaning of trash
in an easy way. It will remove all pointers from trash
until it's empty.
This macro can be used for freeing the data in the trash, like in the following example: