diff --git a/specter/include/Specter/FontCache.hpp b/specter/include/Specter/FontCache.hpp index 8b999a231..e39e998d8 100644 --- a/specter/include/Specter/FontCache.hpp +++ b/specter/include/Specter/FontCache.hpp @@ -191,6 +191,8 @@ public: void closeBuiltinFonts() {m_regFace.close(); m_monoFace.close(); m_curvesFace.close();} const FontAtlas& lookupAtlas(FontTag tag) const; + + void destroyAtlases() {m_cachedAtlases.clear();} }; } diff --git a/specter/include/Specter/ViewResources.hpp b/specter/include/Specter/ViewResources.hpp index 5fefc5afe..e75e61233 100644 --- a/specter/include/Specter/ViewResources.hpp +++ b/specter/include/Specter/ViewResources.hpp @@ -188,6 +188,11 @@ public: ViewResources& operator=(const ViewResources& other) = delete; ViewResources& operator=(ViewResources&& other) = default; + void destroyResData() + { + m_resData.doDestroy(); + } + ~ViewResources() { if (m_fcacheThread.joinable())