From 4dce6d4689d464c3a8825a5d6aa790adfc9228ee Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 31 May 2016 05:46:52 -0700 Subject: Fix a leak in CXFA_FontMgr. Review-Url: https://codereview.chromium.org/2024713002 --- xfa/fxfa/include/xfa_fontmgr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/include/xfa_fontmgr.h') diff --git a/xfa/fxfa/include/xfa_fontmgr.h b/xfa/fxfa/include/xfa_fontmgr.h index d2e731769a..ab59df94c6 100644 --- a/xfa/fxfa/include/xfa_fontmgr.h +++ b/xfa/fxfa/include/xfa_fontmgr.h @@ -45,7 +45,7 @@ class CXFA_DefFontMgr { class CXFA_PDFFontMgr { public: - CXFA_PDFFontMgr(CXFA_FFDoc* pDoc); + explicit CXFA_PDFFontMgr(CXFA_FFDoc* pDoc); ~CXFA_PDFFontMgr(); IFX_Font* GetFont(const CFX_WideStringC& wsFontFamily, @@ -88,10 +88,10 @@ class CXFA_FontMgr { uint16_t wCodePage = 0xFFFF); void LoadDocFonts(CXFA_FFDoc* hDoc); void ReleaseDocFonts(CXFA_FFDoc* hDoc); - void SetDefFontMgr(CXFA_DefFontMgr* pFontMgr); + void SetDefFontMgr(std::unique_ptr pFontMgr); protected: - CXFA_DefFontMgr* m_pDefFontMgr; + std::unique_ptr m_pDefFontMgr; std::map> m_PDFFontMgrMap; std::map m_FontMap; }; -- cgit v1.2.3