el_destroy¶
NAME¶
el_cleanup - cleans all resources allocated by el_init(3) and el_option(3) calls. el_destroy - cleans all resurces allocated by el_new(3).
SYNOPSIS¶
include <embedlog.h>
int el_cleanup(void)
int el_ocleanup(struct el *el)
int el_destroy(struct el *el)
DESCRIPTION¶
el_cleanup(3) flushes all remaining buffers and frees any resources allocated through the life of the library. After clean up, library calls cannot be used without initialization.
el_ocleanup(3) works just the same, but accepts custom el object as argument.
el_destroy(3) works just the same, but must be used when el object has been created with el_new(3) function.
RETURN VALUE¶
Functions return 0 upon successful cleanup or -1 on errors. When -1 was returned no resources were freed, and library functions still can be used.
ERRORS¶
el_cleanup(3) function cannot fail. el_ocleanup(3) and el_destroy(3) may return:
- EINVAL
Passed el object is not valid