Index: xfa/src/fwl/src/core/fwl_targetimp.cpp |
diff --git a/xfa/src/fwl/src/core/fwl_targetimp.cpp b/xfa/src/fwl/src/core/fwl_targetimp.cpp |
index 1acc56a01818c8c9c065e2959f637ade8c7f2341..0ae40d11f47ca845ceb52dd8c2e99ea159e9c95f 100644 |
--- a/xfa/src/fwl/src/core/fwl_targetimp.cpp |
+++ b/xfa/src/fwl/src/core/fwl_targetimp.cpp |
@@ -7,35 +7,37 @@ |
#include "../../../foxitlib.h" |
#include "include/fwl_targetimp.h" |
FX_DWORD IFWL_Target::Release() { |
- FX_DWORD dwRef = ((CFWL_TargetImp*)m_pImpl)->Release(); |
+ FX_DWORD dwRef = m_pImpl->Release(); |
if (!dwRef) { |
- m_pImpl = NULL; |
+ m_pImpl = nullptr; |
delete this; |
} |
return dwRef; |
} |
IFWL_Target* IFWL_Target::Retain() { |
- return ((CFWL_TargetImp*)m_pImpl)->Retain(); |
+ return m_pImpl->Retain(); |
} |
FX_DWORD IFWL_Target::GetRefCount() const { |
- return ((CFWL_TargetImp*)m_pImpl)->GetRefCount(); |
+ return m_pImpl->GetRefCount(); |
} |
FWL_ERR IFWL_Target::GetClassName(CFX_WideString& wsClass) const { |
- return ((CFWL_TargetImp*)m_pImpl)->GetClassName(wsClass); |
+ return m_pImpl->GetClassName(wsClass); |
} |
FX_DWORD IFWL_Target::GetClassID() const { |
- return ((CFWL_TargetImp*)m_pImpl)->GetClassID(); |
+ return m_pImpl->GetClassID(); |
} |
FX_BOOL IFWL_Target::IsInstance(const CFX_WideStringC& wsClass) const { |
- return ((CFWL_TargetImp*)m_pImpl)->IsInstance(wsClass); |
+ return m_pImpl->IsInstance(wsClass); |
} |
FWL_ERR IFWL_Target::Initialize() { |
- return ((CFWL_TargetImp*)m_pImpl)->Initialize(); |
+ return m_pImpl->Initialize(); |
} |
FWL_ERR IFWL_Target::Finalize() { |
- return ((CFWL_TargetImp*)m_pImpl)->Finalize(); |
+ return m_pImpl->Finalize(); |
+} |
+IFWL_Target::~IFWL_Target() { |
+ delete m_pImpl; |
Lei Zhang
2015/11/18 23:26:20
Is |m_pImpl| suppose to be Release()'d like on lin
|
} |
-IFWL_Target::~IFWL_Target() {} |
CFWL_TargetImp::CFWL_TargetImp() : m_dwRefCount(1) { |
} |
CFWL_TargetImp::~CFWL_TargetImp() { |