summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-11 18:41:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-12 14:03:53 +0000
commitc26d6edbc1eef6b525c4073e2ed798234987efab (patch)
treecd238368f26acbc7302f160d6f094d0d0711e2cd /bridges
parent6d15d4a6f6fbc163001ec082d55404481e64bed1 (diff)
LEAK_STATIC_DATA is always defined for WNT
cppu_no_leak and bndchk were remnants from pre-gbuild times Change-Id: Ie9f325c20e39c100b4a7180a9925559f58bcca6b Reviewed-on: https://gerrit.libreoffice.org/34153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r--bridges/Library_cpp_uno.mk7
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx10
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx72
3 files changed, 0 insertions, 89 deletions
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 6486ea2cbda4..01ee21f848fe 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -195,13 +195,6 @@ $(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
-DHAVE_POSIX_FALLOCATE \
))
endif
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
- $(if $(cppu_no_leak)$(bndchk),,\
- -DLEAK_STATIC_DATA \
- ) \
-))
-endif
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources of this library.
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index d6c6271802c7..bd805a419cac 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -391,12 +391,7 @@ void * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTypeDescr ) thro
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pInfos)
{
-#ifdef LEAK_STATIC_DATA
s_pInfos = new ExceptionInfos();
-#else
- static ExceptionInfos s_allExceptionInfos;
- s_pInfos = &s_allExceptionInfos;
-#endif
}
}
@@ -439,12 +434,7 @@ type_info * msci_getRTTI( OUString const & rUNOname )
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pRTTIs)
{
-#ifdef LEAK_STATIC_DATA
s_pRTTIs = new RTTInfos();
-#else
- static RTTInfos s_aRTTIs;
- s_pRTTIs = &s_aRTTIs;
-#endif
}
}
return s_pRTTIs->getRTTI( rUNOname );
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 180828b69c3f..8348014a61f5 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -320,9 +320,6 @@ public:
type_info_descriptor * insert_new_type_info_descriptor(OUString const & rUNOname);
RTTInfos() throw ();
-#if !defined LEAK_STATIC_DATA
- ~RTTInfos() throw ();
-#endif
};
class type_info_
{
@@ -429,22 +426,6 @@ RTTInfos::RTTInfos() throw ()
{
}
-#if !defined LEAK_STATIC_DATA
-RTTInfos::~RTTInfos() throw ()
-{
- SAL_INFO("bridges", "> freeing generated RTTI infos... <");
-
- MutexGuard aGuard( _aMutex );
- for ( t_string2PtrMap::const_iterator iPos( _allRTTI.begin() );
- iPos != _allRTTI.end(); ++iPos )
- {
- type_info_ * pType = static_cast<type_info_ *>(iPos->second);
- pType->~type_info_(); // obsolete, but good style...
- ::rtl_freeMemory( pType );
- }
-}
-#endif
-
void * __cdecl copyConstruct(
void * pExcThis,
void * pSource,
@@ -556,9 +537,6 @@ public:
static DWORD allocationGranularity;
ExceptionInfos() throw ();
-#if !defined LEAK_STATIC_DATA
- ~ExceptionInfos() throw ();
-#endif
};
DWORD ExceptionInfos::allocationGranularity = 0;
@@ -578,10 +556,6 @@ struct RaiseInfo
sal_uInt64 _codeBase;
explicit RaiseInfo(typelib_TypeDescription * pTD) throw ();
-
-#if !defined LEAK_STATIC_DATA
- ~RaiseInfo() throw ();
-#endif
};
/* Rewrite of 32-Bit-Code to work under 64 Bit:
@@ -702,41 +676,10 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
assert(etMem + etMemOffset == pCode + totalSize);
}
-#if !defined LEAK_STATIC_DATA
-RaiseInfo::~RaiseInfo() throw ()
-{
- sal_uInt32 * pTypes = reinterpret_cast<sal_uInt32 *>(_codeBase + _types) + 1;
-
- // Because of placement new we have to call D.-tor, not delete!
- for ( int nTypes = *reinterpret_cast<sal_uInt32 *>(_codeBase + _types); nTypes--; )
- {
- ExceptionType *et = reinterpret_cast<ExceptionType *>(_codeBase + pTypes[nTypes]);
- et->~ExceptionType();
- }
- // free our single block
- ::rtl_freeMemory( _code );
- ::typelib_typedescription_release( _pTD );
-}
-#endif
-
ExceptionInfos::ExceptionInfos() throw ()
{
}
-#if !defined LEAK_STATIC_DATA
-ExceptionInfos::~ExceptionInfos() throw ()
-{
- SAL_INFO("bridges", "> freeing exception infos... <");
-
- MutexGuard aGuard( _aMutex );
- for ( t_string2PtrMap::const_iterator iPos( _allRaiseInfos.begin() );
- iPos != _allRaiseInfos.end(); ++iPos )
- {
- delete static_cast<RaiseInfo *>(iPos->second);
- }
-}
-#endif
-
RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw ()
{
static ExceptionInfos * s_pInfos = nullptr;
@@ -749,12 +692,7 @@ RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw
GetSystemInfo( &systemInfo );
allocationGranularity = systemInfo.dwAllocationGranularity;
-#ifdef LEAK_STATIC_DATA
s_pInfos = new ExceptionInfos();
-#else
- static ExceptionInfos s_allExceptionInfos;
- s_pInfos = &s_allExceptionInfos;
-#endif
}
}
@@ -795,12 +733,7 @@ type_info * mscx_getRTTI(
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_pRTTIs)
{
-#ifdef LEAK_STATIC_DATA
s_pRTTIs = new RTTInfos();
-#else
- static RTTInfos s_aRTTIs;
- s_pRTTIs = &s_aRTTIs;
-#endif
}
}
return s_pRTTIs->getRTTI( rUNOname );
@@ -814,12 +747,7 @@ int mscx_getRTTI_len(
MutexGuard aGuard(Mutex::getGlobalMutex());
if (!s_pRTTIs)
{
-#ifdef LEAK_STATIC_DATA
s_pRTTIs = new RTTInfos();
-#else
- static RTTInfos s_aRTTIs;
- s_pRTTIs = &s_aRTTIs;
-#endif
}
}
return s_pRTTIs->getRTTI_len(rUNOname);