When a compiled function is removed from CompilerCache (via compile_erase or compile_clear_cache), the associated Metal shader libraries and pipeline states in Device::library_kernels_ are not released. They persist until process exit.
Device::clear_library() exists but is never called from the compile cache cleanup path.
Found while investigating Metal resource accumulation in a long-running process that creates and discards compiled functions over time.