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

Function lang_cleanup

tests/test_lang_contract.c:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147static void lang_cleanup(LangProj *lp, cbm_store_t *store) {
148 if (store) {
149 cbm_store_close(store);
150 }
151 if (lp->srv) {
152 cbm_mcp_server_free(lp->srv);
153 lp->srv = NULL;
154 }
155 free(lp->project);
156 lp->project = NULL;
157 th_rmtree(lp->tmpdir);
158 unlink(lp->dbpath);
159 char wal[600];
160 char shm[600];
161 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
162 unlink(wal);
163 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
164 unlink(shm);
165}
166
167/* Count nodes of `label` with >=1 outbound edge. Returns -1 on query error. */
168static int label_with_outbound(cbm_store_t *store, const char *project, const char *label) {

Callers 3

lang_metricsFunction · 0.85
edge_presentFunction · 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