summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_ComboBox.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-12 14:04:06 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-15 13:47:55 +0000
commitb084c1f615e9b5d82a36aeedcff2339b7ac91265 (patch)
treeeb436fb5d228c92ec379ad1f15860ba493ca086d /fpdfsdk/pdfwindow/PWL_ComboBox.h
parentdc3a87c88da1ac710eadabeb2e5cf01aecb63f4b (diff)
downloadpdfium-b084c1f615e9b5d82a36aeedcff2339b7ac91265.tar.xz
Smells like a leak in PWL_ComboBox.cpp
Change-Id: I519d79b2b22d2b947c546c6285195b8ca52f4993 Reviewed-on: https://pdfium-review.googlesource.com/5471 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_ComboBox.h')
-rw-r--r--fpdfsdk/pdfwindow/PWL_ComboBox.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.h b/fpdfsdk/pdfwindow/PWL_ComboBox.h
index e1a8df7561..a687eb8e94 100644
--- a/fpdfsdk/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/pdfwindow/PWL_ComboBox.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_PDFWINDOW_PWL_COMBOBOX_H_
#define FPDFSDK_PDFWINDOW_PWL_COMBOBOX_H_
+#include <memory>
+
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/pdfwindow/PWL_ListBox.h"
#include "fpdfsdk/pdfwindow/PWL_Wnd.h"
@@ -47,9 +49,9 @@ class CPWL_CBButton : public CPWL_Wnd {
class CPWL_ComboBox : public CPWL_Wnd {
public:
CPWL_ComboBox();
- ~CPWL_ComboBox() override {}
+ ~CPWL_ComboBox() override;
- CPWL_Edit* GetEdit() const { return m_pEdit; }
+ CPWL_Edit* GetEdit() const { return m_pEdit.get(); }
// CPWL_Wnd:
CFX_ByteString GetClassName() const override;
@@ -90,9 +92,9 @@ class CPWL_ComboBox : public CPWL_Wnd {
void CreateListBox(const PWL_CREATEPARAM& cp);
void SetPopup(bool bPopup);
- CPWL_CBEdit* m_pEdit;
- CPWL_CBButton* m_pButton;
- CPWL_CBListBox* m_pList;
+ std::unique_ptr<CPWL_CBEdit> m_pEdit;
+ std::unique_ptr<CPWL_CBButton> m_pButton;
+ std::unique_ptr<CPWL_CBListBox> m_pList;
bool m_bPopup;
CFX_FloatRect m_rcOldWindow;
int32_t m_nPopupWhere;