main/duktape_event.c
void esp32_duktape_freeEvent(duk_context *ctx, esp32_duktape_event_t *pEvent) {
	if(pEvent->type == ESP32_DUKTAPE_EVENT_COMMAND_LINE) {
		free(pEvent->commandLine.commandLine);
		return;
	}


	if (pEvent->type == ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED) {
		if (pEvent->callbackRequested.callbackType == ESP32_DUKTAPE_CALLBACK_TYPE_FUNCTION) {
			esp32_duktape_stash_delete(ctx, pEvent->callbackRequested.stashKey);
		}
		return;
	}

	LOGD("We have been asked to free an event of type %d but don't know how",
		pEvent->type);
}
/**
 * Mark the event as completed by releasing any state associated with it.
 */
Mark the event as completed by releasing any state associated with it.
Mark the event as completed by releasing any state associated with it .
void esp32_duktape_freeEvent(duk_context *ctx, esp32_duktape_event_t *pEvent) {
	if(pEvent->type == ESP32_DUKTAPE_EVENT_COMMAND_LINE) {
		free(pEvent->commandLine.commandLine);
		return;
	}
	if (pEvent->type == ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED) {
		if (pEvent->callbackRequested.callbackType == ESP32_DUKTAPE_CALLBACK_TYPE_FUNCTION) {
			esp32_duktape_stash_delete(ctx, pEvent->callbackRequested.stashKey);
		}
		return;
	}
	LOGD("We have been asked to free an event of type %d but don't know how",
		pEvent->type);
}
void esp32_duktape_freeEvent ( duk_context * ctx , esp32_duktape_event_t * pEvent ) { if ( pEvent -> type == ESP32_DUKTAPE_EVENT_COMMAND_LINE ) { free ( pEvent -> commandLine . commandLine ) ; return ; } if ( pEvent -> type == ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED ) { if ( pEvent -> callbackRequested . callbackType == ESP32_DUKTAPE_CALLBACK_TYPE_FUNCTION ) { esp32_duktape_stash_delete ( ctx , pEvent -> callbackRequested . stashKey ) ; } return ; } LOGD ( " " , pEvent -> type ) ; }
Mark the event as completed by releasing any state associated with it.
Mark the event as completed by releasing any state associated with it .