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

Function lang_cleanup

tests/test_lang_contract.c:138–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138static void lang_cleanup(LangProj *lp, cbm_store_t *store) {
139 if (store) {
140 cbm_store_close(store);
141 }
142 if (lp->srv) {
143 cbm_mcp_server_free(lp->srv);
144 lp->srv = NULL;
145 }
146 free(lp->project);
147 lp->project = NULL;
148 th_rmtree(lp->tmpdir);
149 unlink(lp->dbpath);
150 char wal[600];
151 char shm[600];
152 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
153 unlink(wal);
154 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
155 unlink(shm);
156}
157
158/* Count nodes of `label` with >=1 outbound edge. Returns -1 on query error. */
159static 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