new loplugin: useuniqueptr: ucb..ucbhelper

Change-Id: Ib19ca3225b96d1bfec8a43bb762e16597f33b690
Reviewed-on: https://gerrit.libreoffice.org/33297
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-01-19 09:09:05 +02:00
parent 3bb8bdb93f
commit 84defbc556
31 changed files with 69 additions and 110 deletions

View File

@ -50,7 +50,7 @@ class PropertySetInfo :
{
css::uno::Reference< css::ucb::XCommandEnvironment >
m_xEnv;
css::uno::Sequence< css::beans::Property >*
std::unique_ptr<css::uno::Sequence< css::beans::Property >>
m_pProps;
osl::Mutex m_aMutex;
ContentImplHelper* m_pContent;
@ -113,7 +113,7 @@ class CommandProcessorInfo :
{
css::uno::Reference< css::ucb::XCommandEnvironment >
m_xEnv;
css::uno::Sequence< css::ucb::CommandInfo >*
std::unique_ptr<css::uno::Sequence< css::ucb::CommandInfo >>
m_pCommands;
osl::Mutex m_aMutex;
ContentImplHelper* m_pContent;

View File

@ -29,6 +29,7 @@
#include <osl/mutex.hxx>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
#include <memory>
namespace com { namespace sun { namespace star { namespace script {
class XTypeConverter;
@ -60,7 +61,7 @@ class UCBHELPER_DLLPUBLIC PropertyValueSet :
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter;
osl::Mutex m_aMutex;
PropertyValues* m_pValues;
std::unique_ptr<PropertyValues> m_pValues;
bool m_bWasNull;
bool m_bTriedToGetTypeConverter;

View File

@ -56,7 +56,7 @@ class UCBHELPER_DLLPUBLIC ResultSetImplHelper :
public css::lang::XServiceInfo,
public css::ucb::XDynamicResultSet
{
cppu::OInterfaceContainerHelper* m_pDisposeEventListeners;
std::unique_ptr<cppu::OInterfaceContainerHelper> m_pDisposeEventListeners;
bool m_bStatic;
bool m_bInitDone;

View File

@ -129,17 +129,12 @@ CachedContentResultSet::CCRS_Cache::CCRS_Cache(
CachedContentResultSet::CCRS_Cache::~CCRS_Cache()
{
delete m_pResult;
}
void SAL_CALL CachedContentResultSet::CCRS_Cache
::clear()
{
if( m_pResult )
{
delete m_pResult;
m_pResult = nullptr;
}
m_pResult.reset();
clearMappedReminder();
}
@ -147,7 +142,7 @@ void SAL_CALL CachedContentResultSet::CCRS_Cache
::loadData( const FetchResult& rResult )
{
clear();
m_pResult = new FetchResult( rResult );
m_pResult.reset( new FetchResult( rResult ) );
}
bool SAL_CALL CachedContentResultSet::CCRS_Cache
@ -378,7 +373,7 @@ class CCRS_PropertySetInfo :
friend class CachedContentResultSet;
//my Properties
Sequence< css::beans::Property >*
std::unique_ptr<Sequence< css::beans::Property >>
m_pProperties;
long m_nFetchSizePropertyHandle;
@ -402,8 +397,6 @@ public:
explicit CCRS_PropertySetInfo( Reference<
XPropertySetInfo > const & xPropertySetInfoOrigin );
virtual ~CCRS_PropertySetInfo() override;
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
throw( css::uno::RuntimeException, std::exception ) override;
@ -453,12 +446,12 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
if( xInfo.is() )
{
Sequence<Property> aProps = xInfo->getProperties();
m_pProperties = new Sequence<Property> ( aProps );
m_pProperties.reset( new Sequence<Property> ( aProps ) );
}
else
{
OSL_FAIL( "The received XPropertySetInfo doesn't contain required properties" );
m_pProperties = new Sequence<Property>;
m_pProperties.reset( new Sequence<Property> );
}
//ensure, that we haven't got the Properties 'FetchSize' and 'Direction' twice:
@ -510,12 +503,6 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
}
}
CCRS_PropertySetInfo::~CCRS_PropertySetInfo()
{
delete m_pProperties;
}
// XInterface methods.
void SAL_CALL CCRS_PropertySetInfo::acquire()

View File

@ -30,6 +30,8 @@
#include <com/sun/star/ucb/XCachedContentResultSetFactory.hpp>
#include <rtl/ref.hxx>
#include <memory>
#define CACHED_CONTENT_RESULTSET_SERVICE_NAME "com.sun.star.ucb.CachedContentResultSet"
#define CACHED_CONTENT_RESULTSET_FACTORY_NAME "com.sun.star.ucb.CachedContentResultSetFactory"
@ -50,7 +52,8 @@ class CachedContentResultSet
class CCRS_Cache
{
private:
css::ucb::FetchResult* m_pResult;
std::unique_ptr<css::ucb::FetchResult>
m_pResult;
css::uno::Reference< css::ucb::XContentIdentifierMapping >
m_xContentIdentifierMapping;
css::uno::Sequence< sal_Bool >* m_pMappedReminder;

View File

@ -77,8 +77,6 @@ void SAL_CALL DynamicResultSetWrapper::impl_init()
DynamicResultSetWrapper::~DynamicResultSetWrapper()
{
//call impl_deinit() at start of destructor of derived class
delete m_pDisposeEventListeners;
};
void SAL_CALL DynamicResultSetWrapper::impl_deinit()
@ -173,8 +171,8 @@ void SAL_CALL DynamicResultSetWrapper::addEventListener( const Reference< XEvent
osl::Guard< osl::Mutex > aGuard( m_aMutex );
if ( !m_pDisposeEventListeners )
m_pDisposeEventListeners =
new OInterfaceContainerHelper2( m_aContainerMutex );
m_pDisposeEventListeners.reset(
new OInterfaceContainerHelper2( m_aContainerMutex ) );
m_pDisposeEventListeners->addInterface( Listener );
}

View File

@ -35,6 +35,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <rtl/ref.hxx>
#include <memory>
class DynamicResultSetWrapperListener;
class DynamicResultSetWrapper
@ -47,7 +48,7 @@ private:
bool m_bDisposed; ///Dispose call ready.
bool m_bInDispose;///In dispose call
osl::Mutex m_aContainerMutex;
comphelper::OInterfaceContainerHelper2*
std::unique_ptr<comphelper::OInterfaceContainerHelper2>
m_pDisposeEventListeners;
protected:
rtl::Reference<DynamicResultSetWrapperListener>

View File

@ -238,7 +238,6 @@ UniversalContentBroker::UniversalContentBroker(
// virtual
UniversalContentBroker::~UniversalContentBroker()
{
delete m_pDisposeEventListeners;
}
@ -312,7 +311,7 @@ void SAL_CALL UniversalContentBroker::addEventListener(
throw( css::uno::RuntimeException, std::exception )
{
if ( !m_pDisposeEventListeners )
m_pDisposeEventListeners = new OInterfaceContainerHelper2( m_aMutex );
m_pDisposeEventListeners.reset( new OInterfaceContainerHelper2( m_aMutex ) );
m_pDisposeEventListeners->addInterface( Listener );
}

View File

@ -39,6 +39,7 @@
#include "providermap.hxx"
#include <ucbhelper/registerucb.hxx>
#include <memory>
#include <vector>
@ -211,7 +212,7 @@ private:
css::uno::Sequence< css::uno::Any > m_aArguments;
ProviderMap_Impl m_aProviders;
osl::Mutex m_aMutex;
comphelper::OInterfaceContainerHelper2* m_pDisposeEventListeners;
std::unique_ptr<comphelper::OInterfaceContainerHelper2> m_pDisposeEventListeners;
sal_Int32 m_nCommandId;
};

View File

@ -198,11 +198,10 @@ uno::Reference< io::XInputStream > SAL_CALL ActiveDataSink::getInputStream()
class CommandProcessorInfo :
public cppu::WeakImplHelper< ucb::XCommandInfo >
{
uno::Sequence< ucb::CommandInfo > * m_pInfo;
std::unique_ptr< uno::Sequence< ucb::CommandInfo > > m_pInfo;
public:
CommandProcessorInfo();
virtual ~CommandProcessorInfo() override;
// XCommandInfo methods
virtual uno::Sequence< ucb::CommandInfo > SAL_CALL getCommands()
@ -222,7 +221,7 @@ public:
CommandProcessorInfo::CommandProcessorInfo()
{
m_pInfo = new uno::Sequence< ucb::CommandInfo >( 2 );
m_pInfo.reset( new uno::Sequence< ucb::CommandInfo >( 2 ) );
(*m_pInfo)[ 0 ]
= ucb::CommandInfo(
@ -242,13 +241,6 @@ CommandProcessorInfo::CommandProcessorInfo()
}
// virtual
CommandProcessorInfo::~CommandProcessorInfo()
{
delete m_pInfo;
}
// virtual
uno::Sequence< ucb::CommandInfo > SAL_CALL
CommandProcessorInfo::getCommands()

View File

@ -113,12 +113,12 @@ PropertySetMap_Impl;
// class PropertySetInfo_Impl
class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo >
{
Sequence< Property >* m_pProps;
std::unique_ptr<Sequence< Property >>
m_pProps;
PersistentPropertySet* m_pOwner;
public:
explicit PropertySetInfo_Impl(PersistentPropertySet* pOwner);
virtual ~PropertySetInfo_Impl() override;
// XPropertySetInfo
virtual Sequence< Property > SAL_CALL getProperties()
@ -129,7 +129,7 @@ public:
throw( RuntimeException, std::exception ) override;
// Non-interface methods.
void reset() { delete m_pProps; m_pProps = nullptr; }
void reset() { m_pProps.reset(); }
};
@ -2170,14 +2170,6 @@ PropertySetInfo_Impl::PropertySetInfo_Impl(
}
// virtual
PropertySetInfo_Impl::~PropertySetInfo_Impl()
{
delete m_pProps;
// !!! Do not delete m_pOwner !!!
}
// XPropertySetInfo methods.
@ -2310,7 +2302,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
}
// Success.
m_pProps = pPropSeq;
m_pProps.reset( pPropSeq );
return *m_pProps;
}
}
@ -2321,7 +2313,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
}
OSL_FAIL( "PropertySetInfo_Impl::getProperties - Error!" );
m_pProps = new Sequence< Property >( 0 );
m_pProps.reset( new Sequence< Property >( 0 ) );
}
return *m_pProps;

View File

@ -206,7 +206,6 @@ PropertyChangeNotifier::PropertyChangeNotifier(
PropertyChangeNotifier::~PropertyChangeNotifier()
{
delete m_pListeners;
}

View File

@ -24,6 +24,7 @@
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/ucb/XContentIdentifier.hpp>
#include "filglob.hxx"
#include <memory>
#include <unordered_map>
#include <vector>
@ -84,7 +85,7 @@ namespace fileaccess {
{
private:
css::uno::Reference< css::ucb::XContent > m_xCreatorContent;
ListenerMap* m_pListeners;
std::unique_ptr<ListenerMap> m_pListeners;
public:
PropertyChangeNotifier(
const css::uno::Reference< css::ucb::XContent >& xCreatorContent,

View File

@ -92,14 +92,13 @@ FileProvider::FileProvider( const Reference< XComponentContext >& rxContext )
FileProvider::~FileProvider()
{
delete m_pMyShell;
}
// XInitialization
void SAL_CALL FileProvider::init()
{
if( ! m_pMyShell )
m_pMyShell = new TaskManager( m_xContext, this, true );
m_pMyShell.reset( new TaskManager( m_xContext, this, true ) );
}
@ -113,9 +112,9 @@ FileProvider::initialize(
if( aArguments.getLength() > 0 &&
(aArguments[0] >>= config) &&
config == "NoConfig" )
m_pMyShell = new TaskManager( m_xContext, this, false );
m_pMyShell.reset( new TaskManager( m_xContext, this, false ) );
else
m_pMyShell = new TaskManager( m_xContext, this, true );
m_pMyShell.reset( new TaskManager( m_xContext, this, true ) );
}
}
@ -177,7 +176,7 @@ FileProvider::queryContent(
if( err )
throw IllegalIdentifierException( THROW_WHERE );
return Reference< XContent >( new BaseContent( m_pMyShell,xIdentifier,aUnc ) );
return Reference< XContent >( new BaseContent( m_pMyShell.get(), xIdentifier, aUnc ) );
}

View File

@ -36,6 +36,7 @@
#include <com/sun/star/ucb/XFileIdentifierConverter.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <cppuhelper/implbase.hxx>
#include <memory>
// FileProvider
@ -196,7 +197,7 @@ namespace fileaccess {
css::uno::Reference< css::beans::XPropertySetInfo > m_xPropertySetInfo;
TaskManager* m_pMyShell;
std::unique_ptr<TaskManager> m_pMyShell;
};
} // end namespace fileaccess

View File

@ -44,7 +44,6 @@ DynamicResultSet::DynamicResultSet(
DynamicResultSet::~DynamicResultSet()
{
delete m_pFactory;
}

View File

@ -31,7 +31,7 @@ namespace ftp {
class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
{
ResultSetFactory* m_pFactory;
std::unique_ptr<ResultSetFactory> m_pFactory;
private:
virtual void initStatic() override;

View File

@ -223,7 +223,6 @@ HierarchyDataSource::HierarchyDataSource(
// virtual
HierarchyDataSource::~HierarchyDataSource()
{
delete m_pDisposeEventListeners;
}
@ -314,8 +313,8 @@ void SAL_CALL HierarchyDataSource::addEventListener(
osl::Guard< osl::Mutex > aGuard( m_aMutex );
if ( !m_pDisposeEventListeners )
m_pDisposeEventListeners
= new comphelper::OInterfaceContainerHelper2( m_aMutex );
m_pDisposeEventListeners.reset(
new comphelper::OInterfaceContainerHelper2( m_aMutex ) );
m_pDisposeEventListeners->addInterface( Listener );
}

View File

@ -28,6 +28,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/macros.hxx>
#include <memory>
namespace comphelper { class OInterfaceContainerHelper2; }
@ -41,9 +42,9 @@ class HierarchyDataSource : public cppu::OWeakObject,
public css::lang::XMultiServiceFactory
{
osl::Mutex m_aMutex;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider;
comphelper::OInterfaceContainerHelper2 * m_pDisposeEventListeners;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider;
std::unique_ptr<comphelper::OInterfaceContainerHelper2> m_pDisposeEventListeners;
public:
explicit HierarchyDataSource( const css::uno::Reference< css::uno::XComponentContext > & rxContext );

View File

@ -112,7 +112,6 @@ ContentProvider::ContentProvider(
// virtual
ContentProvider::~ContentProvider()
{
delete m_pPackages;
}
// XInterface methods.
@ -234,7 +233,7 @@ ContentProvider::createPackage( const PackageUri & rURI )
}
}
else
m_pPackages = new Packages;
m_pPackages.reset( new Packages );
// Create new package...
uno::Sequence< uno::Any > aArguments( 1 );

View File

@ -45,7 +45,7 @@ class Packages;
class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
{
Packages* m_pPackages;
std::unique_ptr<Packages> m_pPackages;
public:
explicit ContentProvider( const css::uno::Reference< css::uno::XComponentContext >& rxContext );

View File

@ -29,6 +29,7 @@
#include <config_lgpl.h>
#include <string.h>
#include <ne_xml.h>
#include <memory>
#include "LinkSequence.hxx"
@ -38,13 +39,13 @@ using namespace com::sun::star;
struct LinkSequenceParseContext
{
ucb::Link * pLink;
std::unique_ptr<ucb::Link> pLink;
bool hasSource;
bool hasDestination;
LinkSequenceParseContext()
: pLink( nullptr ), hasSource( false ), hasDestination( false ) {}
~LinkSequenceParseContext() { delete pLink; }
~LinkSequenceParseContext() {}
};
#define STATE_TOP (1)
@ -91,7 +92,7 @@ extern "C" int LinkSequence_chardata_callback(
LinkSequenceParseContext * pCtx
= static_cast< LinkSequenceParseContext * >( userdata );
if ( !pCtx->pLink )
pCtx->pLink = new ucb::Link;
pCtx->pLink.reset( new ucb::Link );
switch ( state )
{
@ -120,7 +121,7 @@ extern "C" int LinkSequence_endelement_callback(
LinkSequenceParseContext * pCtx
= static_cast< LinkSequenceParseContext * >( userdata );
if ( !pCtx->pLink )
pCtx->pLink = new ucb::Link;
pCtx->pLink.reset( new ucb::Link );
switch ( state )
{

View File

@ -30,6 +30,7 @@
#include <string.h>
#include <ne_xml.h>
#include "LockEntrySequence.hxx"
#include <memory>
using namespace webdav_ucp;
using namespace com::sun::star;
@ -37,13 +38,13 @@ using namespace com::sun::star;
struct LockEntrySequenceParseContext
{
ucb::LockEntry * pEntry;
std::unique_ptr<ucb::LockEntry> pEntry;
bool hasScope;
bool hasType;
LockEntrySequenceParseContext()
: pEntry( nullptr ), hasScope( false ), hasType( false ) {}
~LockEntrySequenceParseContext() { delete pEntry; }
~LockEntrySequenceParseContext() { }
};
#define STATE_TOP (1)
@ -140,7 +141,7 @@ extern "C" int LockEntrySequence_endelement_callback(
LockEntrySequenceParseContext * pCtx
= static_cast< LockEntrySequenceParseContext * >( userdata );
if ( !pCtx->pEntry )
pCtx->pEntry = new ucb::LockEntry;
pCtx->pEntry.reset( new ucb::LockEntry );
switch ( state )
{

View File

@ -38,7 +38,7 @@ using namespace com::sun::star;
struct LockSequenceParseContext
{
ucb::Lock * pLock;
std::unique_ptr<ucb::Lock> pLock;
bool hasLockScope;
bool hasLockType;
bool hasDepth;
@ -49,7 +49,7 @@ struct LockSequenceParseContext
: pLock( nullptr ), hasLockScope( false ), hasLockType( false ),
hasDepth( false ), hasHREF( false ), hasTimeout( false ) {}
~LockSequenceParseContext() { delete pLock; }
~LockSequenceParseContext() {}
};
#define STATE_TOP (1)
@ -133,7 +133,7 @@ extern "C" int LockSequence_chardata_callback(
LockSequenceParseContext * pCtx
= static_cast< LockSequenceParseContext * >( userdata );
if ( !pCtx->pLock )
pCtx->pLock = new ucb::Lock;
pCtx->pLock.reset( new ucb::Lock );
// Beehive sends XML values containing trailing newlines.
if ( buf[ len - 1 ] == 0x0a )
@ -242,7 +242,7 @@ extern "C" int LockSequence_endelement_callback(
LockSequenceParseContext * pCtx
= static_cast< LockSequenceParseContext * >( userdata );
if ( !pCtx->pLock )
pCtx->pLock = new ucb::Lock;
pCtx->pLock.reset( new ucb::Lock );
switch ( state )
{

View File

@ -69,7 +69,7 @@ bool ContentProvider::getProperty(
osl::MutexGuard aGuard( m_aMutex );
if ( !m_pProps )
{
m_pProps = new PropertyMap;
m_pProps.reset( new PropertyMap );
// Fill map of known properties...

View File

@ -58,7 +58,6 @@ ContentProvider::ContentProvider(
// virtual
ContentProvider::~ContentProvider()
{
delete m_pProps;
}

View File

@ -73,7 +73,7 @@ namespace webdav_ucp {
class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
{
rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory;
PropertyMap * m_pProps;
std::unique_ptr<PropertyMap> m_pProps;
public:
explicit ContentProvider( const css::uno::Reference< css::uno::XComponentContext >& rxContext );

View File

@ -51,7 +51,6 @@ PropertySetInfo::PropertySetInfo(
// virtual
PropertySetInfo::~PropertySetInfo()
{
delete m_pProps;
}
@ -105,7 +104,7 @@ uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
{
uno::Sequence< beans::Property > aProps
= m_pContent->getProperties( m_xEnv );
m_pProps = new uno::Sequence< beans::Property >( aProps );
m_pProps.reset(new uno::Sequence< beans::Property >( aProps ));
}
catch ( uno::RuntimeException const & )
{
@ -113,7 +112,7 @@ uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
}
catch ( uno::Exception const & )
{
m_pProps = new uno::Sequence< beans::Property >( 0 );
m_pProps.reset(new uno::Sequence< beans::Property >( 0 ));
}
@ -182,8 +181,7 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName(
void PropertySetInfo::reset()
{
osl::MutexGuard aGuard( m_aMutex );
delete m_pProps;
m_pProps = nullptr;
m_pProps.reset();
}
@ -226,7 +224,6 @@ CommandProcessorInfo::CommandProcessorInfo(
// virtual
CommandProcessorInfo::~CommandProcessorInfo()
{
delete m_pCommands;
}
@ -284,7 +281,7 @@ CommandProcessorInfo::getCommands()
{
uno::Sequence< css::ucb::CommandInfo > aCmds
= m_pContent->getCommands( m_xEnv );
m_pCommands = new uno::Sequence< css::ucb::CommandInfo >( aCmds );
m_pCommands.reset(new uno::Sequence< css::ucb::CommandInfo >( aCmds ));
}
catch ( uno::RuntimeException const & )
{
@ -292,7 +289,7 @@ CommandProcessorInfo::getCommands()
}
catch ( uno::Exception const & )
{
m_pCommands = new uno::Sequence< css::ucb::CommandInfo >( 0 );
m_pCommands.reset(new uno::Sequence< css::ucb::CommandInfo >( 0 ));
}
}
}
@ -354,8 +351,7 @@ sal_Bool SAL_CALL CommandProcessorInfo::hasCommandByHandle( sal_Int32 Handle )
void CommandProcessorInfo::reset()
{
osl::MutexGuard aGuard( m_aMutex );
delete m_pCommands;
m_pCommands = nullptr;
m_pCommands.reset();
}

View File

@ -242,7 +242,6 @@ PropertyValueSet::PropertyValueSet(
// virtual
PropertyValueSet::~PropertyValueSet()
{
delete m_pValues;
}

View File

@ -83,7 +83,7 @@ class PropertySetInfo :
public lang::XTypeProvider,
public beans::XPropertySetInfo
{
uno::Sequence< beans::Property >* m_pProps;
std::unique_ptr<uno::Sequence< beans::Property >> m_pProps;
private:
bool queryProperty(
@ -93,7 +93,6 @@ public:
PropertySetInfo(
const PropertyInfo* pProps,
sal_Int32 nProps );
virtual ~PropertySetInfo() override;
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
@ -1527,8 +1526,8 @@ namespace ucbhelper_impl {
PropertySetInfo::PropertySetInfo(
const PropertyInfo* pProps,
sal_Int32 nProps )
: m_pProps( new uno::Sequence< beans::Property >( nProps ) )
{
m_pProps = new uno::Sequence< beans::Property >( nProps );
if ( nProps )
{
@ -1550,12 +1549,6 @@ PropertySetInfo::PropertySetInfo(
}
// virtual
PropertySetInfo::~PropertySetInfo()
{
delete m_pProps;
}
// XInterface methods.
void SAL_CALL PropertySetInfo::acquire()

View File

@ -60,7 +60,6 @@ ResultSetImplHelper::ResultSetImplHelper(
// virtual
ResultSetImplHelper::~ResultSetImplHelper()
{
delete m_pDisposeEventListeners;
}
@ -144,8 +143,7 @@ void SAL_CALL ResultSetImplHelper::addEventListener(
osl::MutexGuard aGuard( m_aMutex );
if ( !m_pDisposeEventListeners )
m_pDisposeEventListeners
= new cppu::OInterfaceContainerHelper( m_aMutex );
m_pDisposeEventListeners.reset(new cppu::OInterfaceContainerHelper( m_aMutex ));
m_pDisposeEventListeners->addInterface( Listener );
}