summaryrefslogtreecommitdiff
path: root/vcl/skia/osx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-10-03 16:00:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-10-12 13:09:24 +0200
commit2e78c92dfeefc301b1cc69130433917c3e77bfdc (patch)
treeeed658c8b7bd9d99919f543753bc21c6bd49ace4 /vcl/skia/osx
parent0f2bec39d5d90ec7f0879e57ff5b23d671bf8489 (diff)
use unique_ptr for SystemFontList, fix leak
Using unique_ptr here fixes a leak, which in turn was hiding the fact that we don't manage the lifecycle of CTFontDescriptor in CoreTextFontFace properly Change-Id: I2ade5fae9a40ad0ebb10538488018941f3f285c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/skia/osx')
-rw-r--r--vcl/skia/osx/gdiimpl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx
index ffc84ae89006..fef8b54e3db4 100644
--- a/vcl/skia/osx/gdiimpl.cxx
+++ b/vcl/skia/osx/gdiimpl.cxx
@@ -289,7 +289,7 @@ void AquaSkiaSalGraphicsImpl::drawTextLayout(const GenericSalLayout& rLayout,
if (!fontManager)
{
- SystemFontList* fontList = GetCoretextFontList();
+ std::unique_ptr<SystemFontList> fontList = GetCoretextFontList();
if (fontList == nullptr)
{
SAL_WARN("vcl.skia", "DrawTextLayout(): No coretext font list");