From 21e954b59fcef1b84fdcdb9ae337e2d4c060b19e Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 8 Feb 2017 10:05:05 -0500 Subject: Remove CopyToLocal from CFDE_CSSDeclaration This CL removes the CopyToLocal method and creates CFX_WideString's directly. This fixes several memory leaks as the CopyToLocal strings were not cleaned up correctly. Change-Id: Ie5ba4cdc4d713cd0b8e3fb85e02f27dc09f38af1 Reviewed-on: https://pdfium-review.googlesource.com/2553 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fde/css/cfde_csscustomproperty.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'xfa/fde/css/cfde_csscustomproperty.h') diff --git a/xfa/fde/css/cfde_csscustomproperty.h b/xfa/fde/css/cfde_csscustomproperty.h index 6e99630e1c..6970d49cbb 100644 --- a/xfa/fde/css/cfde_csscustomproperty.h +++ b/xfa/fde/css/cfde_csscustomproperty.h @@ -11,8 +11,17 @@ class CFDE_CSSCustomProperty { public: - const FX_WCHAR* pwsName; - const FX_WCHAR* pwsValue; + CFDE_CSSCustomProperty(const CFX_WideString& name, + const CFX_WideString& value); + CFDE_CSSCustomProperty(const CFDE_CSSCustomProperty& prop); + ~CFDE_CSSCustomProperty(); + + CFX_WideString name() const { return name_; } + CFX_WideString value() const { return value_; } + + private: + CFX_WideString name_; + CFX_WideString value_; }; #endif // XFA_FDE_CSS_CFDE_CSSCUSTOMPROPERTY_H_ -- cgit v1.2.3