23 lines
721 B
C
23 lines
721 B
C
#ifndef FREE_H_
|
|
|
|
#define FREE(obj) \
|
|
do \
|
|
{ \
|
|
free(obj); \
|
|
(obj) = NULL; \
|
|
} while (0)
|
|
|
|
#define FULL_FREE(obj) \
|
|
do \
|
|
{ \
|
|
if ((obj)) \
|
|
{ \
|
|
memset((obj), '\0', strlen((obj))); \
|
|
FREE((obj)); \
|
|
} \
|
|
} while (0)
|
|
|
|
|
|
#define FREE_H_
|
|
#endif
|