COSMIC had an issue where it was caching unused fonts leading to it using more memory than it should, i.e a memory leak, this is something that is simply developer error and completely unsolvable at the level of the language without context on the correct behavior of the project