summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-05-24 22:42:46 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-25 00:17:08 +0200
commitc271eb95a8519c88af809ee7a0e1c750e08beb27 (patch)
tree2b26dec67be0048d7329a6cd4af10ae3a0318011 /sw
parentb55cb6f2bd09ac91fabd5ce1a5bb5766e837e29f (diff)
SwCache: fix non-DBGUTIL memory leak in previous commit
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/swcache.cxx8
-rw-r--r--sw/source/core/inc/swcache.hxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index adbcb949f21a..c63afb52fad7 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -70,9 +70,9 @@ void SwCache::Check()
SAL_WARN_IF( pObj == pRekursive, "sw", "Recursion in SwCache." );
}
SAL_WARN_IF( !bFirstFound, "sw", "First not Found." );
- SAL_WARN_IF( nCnt + aFreePositions.size() != Count(), "sw", "Lost Chain." );
+ SAL_WARN_IF( nCnt + aFreePositions.size() != size(), "sw", "Lost Chain." );
SAL_WARN_IF(
- Count() == nCurMax && nCurMax != aFreePositions.size() + nCnt, "sw",
+ size() == nCurMax && nCurMax != aFreePositions.size() + nCnt, "sw",
"Lost FreePositions." );
}
#endif
@@ -119,9 +119,9 @@ SwCache::SwCache( const sal_uInt16 nInitSize
m_aCacheObjects.reserve( (sal_uInt8)nInitSize );
}
-#ifdef DBG_UTIL
SwCache::~SwCache()
{
+#ifdef DBG_UTIL
{
rtl::OStringBuffer sOut(m_aName);
@@ -182,11 +182,11 @@ SwCache::~SwCache()
OSL_TRACE(sOut.getStr());
}
Check();
+#endif
for(SwCacheObjArr::const_iterator it = m_aCacheObjects.begin(); it != m_aCacheObjects.end(); ++it)
delete *it;
}
-#endif
/*************************************************************************
|* SwCache::Flush()
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index f4167dac97fe..5934c1165e7d 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -106,11 +106,11 @@ public:
//nur sal_uInt8 hineinstecken!!!
#ifdef DBG_UTIL
SwCache( const sal_uInt16 nInitSize, const rtl::OString &rNm );
- // the destructor will free all objects still in the vector
- ~SwCache();
#else
SwCache( const sal_uInt16 nInitSize );
#endif
+ // the destructor will free all objects still in the vector
+ ~SwCache();
void Flush( const sal_uInt8 nPercent = 100 );