Пример #1
0
/**
 * Releases the memory resources used by the library
 *
 */
void iotkit_cleanup() {
    if(isInitialized) {
        rest_cleanup();
        isInitialized = false;
    } else {
        #if DEBUG
            puts("Library is not initialized and doesn't need to cleanup resources");
        #endif
    }
}
Пример #2
0
/*
 *	Only free memory we allocated.  The strings allocated via
 *	cf_section_parse() do not need to be freed.
 */
static int mod_detach(void *instance)
{
	rlm_rest_t *inst = instance;

	fr_connection_pool_delete(inst->conn_pool);

	/* Free any memory used by libcurl */
	rest_cleanup();

	return 0;
}