summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa/fpdfxfa_app.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_app.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
index 22d84f1f9f..b829246908 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
@@ -33,16 +33,12 @@ void CPDFXFA_App::ReleaseInstance() {
CPDFXFA_App::CPDFXFA_App()
: m_bJavaScriptInitialized(FALSE),
- m_pXFAApp(nullptr),
m_pIsolate(nullptr),
m_csAppType(JS_STR_VIEWERTYPE_STANDARD) {
m_pEnvList.RemoveAll();
}
CPDFXFA_App::~CPDFXFA_App() {
- delete m_pXFAApp;
- m_pXFAApp = nullptr;
-
FXJSE_Runtime_Release(m_pIsolate);
m_pIsolate = nullptr;
@@ -58,7 +54,7 @@ FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
if (!m_pIsolate)
return FALSE;
- m_pXFAApp = new CXFA_FFApp(this);
+ m_pXFAApp.reset(new CXFA_FFApp(this));
m_pXFAApp->SetDefaultFontMgr(
std::unique_ptr<CXFA_DefFontMgr>(new CXFA_DefFontMgr));