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

Function gp_cleanup

tests/test_grammar_probe_c.c:103–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static void gp_cleanup(GP_Proj *lp, cbm_store_t *store) {
104 if (store) cbm_store_close(store);
105 if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; }
106 free(lp->project); lp->project = NULL;
107 th_rmtree(lp->tmpdir);
108 unlink(lp->dbpath);
109 char wal[600], shm[600];
110 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
111 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
112 unlink(wal); unlink(shm);
113}
114
115/* Count graph nodes by label. Returns -1 on query error. */
116static int gp_count_label(cbm_store_t *store, const char *project, const char *label) {

Callers 1

Calls 3

cbm_store_closeFunction · 0.85
cbm_mcp_server_freeFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected