diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 10:21:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 09:47:42 +0000 |
commit | 0b21f434b45c350cd9cc5b820226245d6824bf86 (patch) | |
tree | 2db24f59783e6a91bee55fb2cd75421836f6dd60 /basic | |
parent | Fix the WebDAV lock owner name shown on file locked dialog UI (diff) | |
download | core-0b21f434b45c350cd9cc5b820226245d6824bf86.tar.gz core-0b21f434b45c350cd9cc5b820226245d6824bf86.zip |
masses of MessBoxes not being disposed promptly
since...
commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date: Thu May 28 21:35:43 2015 +0100
tdf#91702 - fix stack-based MessBox allocation.
There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X
(cherry picked from commit a860df25dd7bf62ecb6b3d3ed38803b981f56d52)
Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Reviewed-on: https://gerrit.libreoffice.org/27537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index e10b7b356111..a9ceda6801ad 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -103,7 +103,7 @@ void BasicDLL::BasicBreak() { bJustStopping = true; StarBASIC::Stop(); - ScopedVclPtr<InfoBox>::Create( nullptr, BasResId(IDS_SBERR_TERMINATED).toString() )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, BasResId(IDS_SBERR_TERMINATED).toString())->Execute(); bJustStopping = false; } } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index f08edc8d0061..363e5ab4f61b 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -742,9 +742,9 @@ void SbiIoSystem::Shutdown() { #if defined __GNUC__ vcl::Window* pParent = Application::GetDefDialogParent(); - ScopedVclPtrInstance<MessBox>::Create( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute(); #else - ScopedVclPtrInstance<MessBox>::Create( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute(); #endif } aOut.clear(); @@ -887,10 +887,10 @@ void SbiIoSystem::WriteCon(const OUString& rText) } { SolarMutexGuard aSolarGuard; - if( !ScopedVclPtr<MessBox>::Create( + if( !ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), WinBits( WB_OK_CANCEL | WB_DEF_OK ), - OUString(), s )->Execute() ) + OUString(), s)->Execute() ) { nError = ERRCODE_BASIC_USER_ABORT; } |