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:
parent
8f9ced9857
commit
b0088967c3
@ -177,6 +177,8 @@ QCoreTextFontDatabase::QCoreTextFontDatabase()
|
|||||||
|
|
||||||
QCoreTextFontDatabase::~QCoreTextFontDatabase()
|
QCoreTextFontDatabase::~QCoreTextFontDatabase()
|
||||||
{
|
{
|
||||||
|
foreach (CTFontDescriptorRef ref, m_systemFontDescriptors)
|
||||||
|
CFRelease(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CFArrayRef availableFamilyNames()
|
static CFArrayRef availableFamilyNames()
|
||||||
|
Loading…
Reference in New Issue
Block a user