Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
leak_guard.rs1.05 kB
#[cfg(feature = "leak-detect")] pub struct LeakGuard; #[cfg(feature = "leak-detect")] impl LeakGuard { pub fn new() -> Self { Self } } #[cfg(feature = "leak-detect")] impl Drop for LeakGuard { fn drop(&mut self) { // On shutdown, emit a final metric update and log if leaks are present crate::metrics::update_memory_metrics(); let leaked = crate::metrics::MEM_LEAKED_ALLOCATIONS.get(); if leaked > 0 { let leaked_bytes = crate::metrics::MEM_LEAKED_BYTES.get(); tracing::error!( leaked_allocations = leaked, leaked_bytes = leaked_bytes, "LeakGuard detected outstanding allocations at shutdown" ); } else { tracing::info!("LeakGuard: no outstanding allocations at shutdown"); } } } // No-op stub when feature disabled #[cfg(not(feature = "leak-detect"))] pub struct LeakGuard; #[cfg(not(feature = "leak-detect"))] impl LeakGuard { pub fn new() -> Self { Self } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/codegraph-rust'

If you have feedback or need assistance with the MCP directory API, please join our Discord server