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>
This commit is contained in:
Tim Blechmann 2014-12-05 12:28:53 +01:00 committed by Tor Arne Vestbø
parent 8f9ced9857
commit b0088967c3

View File

@ -177,6 +177,8 @@ QCoreTextFontDatabase::QCoreTextFontDatabase()
QCoreTextFontDatabase::~QCoreTextFontDatabase()
{
foreach (CTFontDescriptorRef ref, m_systemFontDescriptors)
CFRelease(ref);
}
static CFArrayRef availableFamilyNames()