void ekErrorDestroy(ekContext *E, ekError *error) { ekStringClear(E, &error->line); ekStringClear(E, &error->explanation); ekStringClear(E, &error->filename); ekFree(error); }
void ekChunkDestroy(struct ekContext * E, ekChunk * chunk) { // chunk->block is either NULL or pointing inside chunk->blocks ekArrayDestroy(E, &chunk->blocks, (ekDestroyCB)ekBlockDestroy); ekArrayDestroy(E, &chunk->kStrings, (ekDestroyCB)ekDestroyCBFree); ek32ArrayDestroy(E, &chunk->kInts); ek32ArrayDestroy(E, &chunk->kFloats); ekStringClear(E, &chunk->sourcePath); ekStringClear(E, &chunk->searchPath); ekFree(chunk); }