void qb_free_extractor_context(qb_extractor_context *cxt) { qb_free_pbj_translator_context(cxt->translator_context); qb_free_compiler_context(cxt->compiler_context); qb_free_data_pool(cxt->pool); efree(cxt->translator_context); efree(cxt->compiler_context); efree(cxt->pool); }
void qb_free_build_context(qb_build_context *cxt) { qb_free_data_pool(cxt->pool); if(cxt->compiler_contexts) { uint32_t i; for(i = 0; i < cxt->compiler_context_count; i++) { qb_compiler_context *compiler_cxt = cxt->compiler_contexts[i]; if(compiler_cxt->translator_context) { switch(compiler_cxt->translation) { case QB_TRANSLATION_PHP: { qb_free_php_translator_context(compiler_cxt->translator_context); } break; case QB_TRANSLATION_PBJ: { qb_free_pbj_translator_context(compiler_cxt->translator_context); } break; } efree(compiler_cxt->translator_context); } qb_free_compiler_context(compiler_cxt); efree(compiler_cxt); } efree(cxt->compiler_contexts); } }