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

Function ncp_cleanup

tests/test_node_creation_probe.c:118–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static void ncp_cleanup(NcpLangProj *lp, cbm_store_t *store) {
119 if (store)
120 cbm_store_close(store);
121 if (lp->srv) {
122 cbm_mcp_server_free(lp->srv);
123 lp->srv = NULL;
124 }
125 free(lp->project);
126 lp->project = NULL;
127 th_rmtree(lp->tmpdir);
128 unlink(lp->dbpath);
129 char wal[600], shm[600];
130 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
131 unlink(wal);
132 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
133 unlink(shm);
134}
135
136/* Count nodes with a given label. Returns -1 on error. */
137static int ncp_count_label(cbm_store_t *store, const char *project, const char *label) {

Callers 1

ncp_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