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

Function lrp_cleanup

tests/test_lsp_resolution_probe.c:176–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176static void lrp_cleanup(LRP_Proj *lp, cbm_store_t *store) {
177 if (store)
178 cbm_store_close(store);
179 if (lp->srv) {
180 cbm_mcp_server_free(lp->srv);
181 lp->srv = NULL;
182 }
183 free(lp->project);
184 lp->project = NULL;
185 th_rmtree(lp->tmpdir);
186 unlink(lp->dbpath);
187 char wal[600], shm[600];
188 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
189 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
190 unlink(wal);
191 unlink(shm);
192}
193
194/* Returns USAGE edge count (-1 on DB failure). */
195static int lrp_usage(LRP_Proj *lp, const LRP_File *files, int nfiles) {

Callers 4

lrp_usageFunction · 0.85
lrp_assert_callsFunction · 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