From 0afb2b63b38dff138e66f4ac8afed60911cb6aad Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 May 2021 14:14:49 +0200 Subject: fix some leaks in basic Change-Id: I52c10cdbe9661974c908ee052336c779a40de402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115323 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'basic/source/classes/sbunoobj.cxx') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 15c5e3778201..f4dbd35e3b6c 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2848,7 +2848,7 @@ Any SbUnoObject::getUnoAny() } // help method to create a Uno-Struct per CoreReflection -static SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName ) +static SbUnoObjectRef Impl_CreateUnoStruct( const OUString& aClassName ) { // get CoreReflection Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl(); @@ -2873,21 +2873,21 @@ static SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName ) Any aNewAny; xClass->createObject( aNewAny ); // make a SbUnoObject out of it - SbUnoObject* pUnoObj = new SbUnoObject( aClassName, aNewAny ); + SbUnoObjectRef pUnoObj = new SbUnoObject( aClassName, aNewAny ); return pUnoObj; } // Factory-Class to create Uno-Structs per DIM AS NEW -SbxBase* SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) +SbxBaseRef SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) { // Via SbxId nothing works in Uno return nullptr; } -SbxObject* SbUnoFactory::CreateObject( const OUString& rClassName ) +SbxObjectRef SbUnoFactory::CreateObject( const OUString& rClassName ) { - return Impl_CreateUnoStruct( rClassName ); + return Impl_CreateUnoStruct( rClassName ).get(); } -- cgit