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

Function gpg_cleanup

tests/test_grammar_probe_g.c:125–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125static void gpg_cleanup(GpgProj *lp, cbm_store_t *store) {
126 if (store)
127 cbm_store_close(store);
128 if (lp->srv) {
129 cbm_mcp_server_free(lp->srv);
130 lp->srv = NULL;
131 }
132 free(lp->project);
133 lp->project = NULL;
134 th_rmtree(lp->tmpdir);
135 unlink(lp->dbpath);
136 char wal[600], shm[600];
137 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
138 unlink(wal);
139 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
140 unlink(shm);
141}
142
143/* ── Node-count helpers ─────────────────────────────────────────── */
144

Callers 1

gpg_metrics_filesFunction · 0.85

Calls 3

cbm_store_closeFunction · 0.85
cbm_mcp_server_freeFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected