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

Function mn_cleanup

tests/test_matrix_new_constructs.c:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static void mn_cleanup(MN_LangProj *lp, cbm_store_t *store) {
107 if (store) cbm_store_close(store);
108 if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; }
109 free(lp->project);
110 lp->project = NULL;
111 th_rmtree(lp->tmpdir);
112 unlink(lp->dbpath);
113 char wal[600], shm[600];
114 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
115 unlink(wal);
116 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
117 unlink(shm);
118}
119
120/* Count nodes with a given label; -1 on error. */
121static int mn_count_label(cbm_store_t *store, const char *project, const char *label) {

Callers 2

mn_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