diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-30 17:49:20 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 13:13:53 +0100 |
commit | 582e89610b366c0d887baa6b8de7fa5f065900fa (patch) | |
tree | 91f3b723d1485b5616d457e30011fa55914785a4 /vcl/unx | |
parent | 49dadad0b55f879ebe5daf539a97043d283ad0a8 (diff) |
vclptr: create Instance helpers, and set initial ref-count to 1.
Document that in README.lifecycle; the problem is that our constructors
currently take and release references left/right on the object being
created, which ... means we need an initial reference.
Change-Id: I5de952b73ac67888c3fbb150d4a7cde2a7bc9abf
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/printer/cupsmgr.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/x11/x11sys.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index daddd1ac286f..d51f752463df 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -966,7 +966,7 @@ namespace { bool bRet = false; - ScopedVclPtr<RTSPWDialog> aDialog(new RTSPWDialog(rServer, rUserName, NULL)); + ScopedVclPtrInstance<RTSPWDialog> aDialog(rServer, rUserName, nullptr); if (aDialog->Execute()) { rUserName = aDialog->getUserName(); diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index 8cad695b5265..6723c63b8047 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -134,7 +134,7 @@ int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMes if( pSVData->mpIntroWindow ) pSVData->mpIntroWindow->Hide(); - ScopedVclPtr<WarningBox> aWarn(new WarningBox(NULL, WB_STDWORK, rMessage) ); + ScopedVclPtrInstance<WarningBox> aWarn(nullptr, WB_STDWORK, rMessage); aWarn->SetText( rTitle ); aWarn->Clear(); |