From b0088967c3373b604d102384d97e1d56a9c0ac9e Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Fri, 5 Dec 2014 12:28:53 +0100 Subject: QCoreTextFontDatabase: release CTFontDescriptorRef references in dtor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QCoreTextFontDatabase::m_systemFontDescriptors owns the references to the underlying CTFontDescriptorRef objects. in order to avoid a leak, we should release them Change-Id: I8fc6c158908e0173696cd91058ac34efb3de01d5 Reviewed-by: Tor Arne Vestbø --- src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/platformsupport') diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index 9f2ff10a21..f447defbce 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -177,6 +177,8 @@ QCoreTextFontDatabase::QCoreTextFontDatabase() QCoreTextFontDatabase::~QCoreTextFontDatabase() { + foreach (CTFontDescriptorRef ref, m_systemFontDescriptors) + CFRelease(ref); } static CFArrayRef availableFamilyNames() -- cgit v1.2.3