summaryrefslogtreecommitdiff
path: root/vcl/workben/vcldemo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/workben/vcldemo.cxx')
-rw-r--r--vcl/workben/vcldemo.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 1c95e32ba3dd..da9a4f1ff778 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1812,8 +1812,8 @@ public:
class DemoWidgets : public WorkWindow
{
- MenuBar *mpBar;
- PopupMenu *mpPopup;
+ VclPtr<MenuBar> mpBar;
+ VclPtr<PopupMenu> mpPopup;
VclPtr<VclBox> mpBox;
VclPtr<ToolBox> mpToolbox;
@@ -1867,9 +1867,9 @@ public:
mpGLButton->Show();
mpHBox->Show();
- mpBar = new MenuBar();
+ mpBar = VclPtr<MenuBar>::Create();
mpBar->InsertItem(0,"File");
- mpPopup = new PopupMenu();
+ mpPopup = VclPtr<PopupMenu>::Create();
mpPopup->InsertItem(0,"Item");
mpBar->SetPopupMenu(0, mpPopup);
SetMenuBar(mpBar);
@@ -1886,8 +1886,8 @@ public:
mpToolbox.disposeAndClear();
mpButton.disposeAndClear();
mpBox.disposeAndClear();
- delete mpPopup;
- delete mpBar;
+ mpPopup.disposeAndClear();
+ mpBar.disposeAndClear();
WorkWindow::dispose();
}
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override