summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2014-12-05 12:28:53 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-01-07 21:32:05 +0100
commitb0088967c3373b604d102384d97e1d56a9c0ac9e (patch)
tree72f6ff7958464dbb5588d5e653861899a2801842 /src/platformsupport
parent8f9ced985727136dc7d1502b7212a54f65b8b113 (diff)
QCoreTextFontDatabase: release CTFontDescriptorRef references in dtor
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ø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm2
1 files changed, 2 insertions, 0 deletions
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()