MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pdf_doc_close

Function pdf_doc_close

internal/cbm/pdf/pdf_obj.c:2140–2153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2138}
2139
2140void pdf_doc_close(pdf_doc_t *d) {
2141 if (d->scratch_arena_live) {
2142 cbm_arena_destroy(&d->scratch_arena);
2143 }
2144 xref_free(&d->xref);
2145 pdf_map_free(&d->fonts);
2146 cbm_free(CBM_MEM_CLASS_EXTRACT, d->hdrs);
2147 cbm_free(CBM_MEM_CLASS_EXTRACT, d->scratch);
2148 for (int i = 0; i < d->nowned; i++) {
2149 cbm_free(CBM_MEM_CLASS_EXTRACT, d->owned[i]);
2150 }
2151 cbm_free(CBM_MEM_CLASS_EXTRACT, (void *)d->owned);
2152 cbm_free(CBM_MEM_CLASS_EXTRACT, (void *)d->font_list);
2153}
2154
2155/* ── Filters ─────────────────────────────────────────────────────── */
2156

Callers 1

cbm_pdf_extractFunction · 0.85

Calls 4

xref_freeFunction · 0.85
pdf_map_freeFunction · 0.85
cbm_freeFunction · 0.85
cbm_arena_destroyFunction · 0.50

Tested by

no test coverage detected