From e60306d3d77137bb57684818ae70a91d19cba4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 23 Jul 2013 14:27:03 +0200 Subject: [PATCH] MagnumFont: don't forget to close on destruction. --- src/Plugins/MagnumFont/MagnumFont.cpp | 2 ++ src/Plugins/MagnumFont/MagnumFont.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Plugins/MagnumFont/MagnumFont.cpp b/src/Plugins/MagnumFont/MagnumFont.cpp index 82111786d..79a6c5193 100644 --- a/src/Plugins/MagnumFont/MagnumFont.cpp +++ b/src/Plugins/MagnumFont/MagnumFont.cpp @@ -61,6 +61,8 @@ MagnumFont::MagnumFont(): _opened(nullptr) {} MagnumFont::MagnumFont(PluginManager::AbstractManager* const manager, std::string plugin): AbstractFont(manager, std::move(plugin)), _opened(nullptr) {} +MagnumFont::~MagnumFont() { close(); } + auto MagnumFont::doFeatures() const -> Features { return Feature::OpenData|Feature::MultiFile|Feature::PreparedGlyphCache; } bool MagnumFont::doIsOpened() const { return _opened; } diff --git a/src/Plugins/MagnumFont/MagnumFont.h b/src/Plugins/MagnumFont/MagnumFont.h index 065b8f1e6..1e772e778 100644 --- a/src/Plugins/MagnumFont/MagnumFont.h +++ b/src/Plugins/MagnumFont/MagnumFont.h @@ -99,6 +99,8 @@ class MagnumFont: public AbstractFont { /** @brief Plugin manager constructor */ explicit MagnumFont(PluginManager::AbstractManager* manager, std::string plugin); + ~MagnumFont(); + private: class Data;