Kaydet (Commit) 3d652128 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

fix memory leak around function descriptions

Found by Lsan.

Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c
üst 53e4b24c
......@@ -21,6 +21,8 @@
#include <unotools/charclass.hxx>
#include <unotools/syslocale.hxx>
#include <boost/scoped_ptr.hpp>
namespace formula
{
......@@ -91,7 +93,7 @@ bool FormulaHelper::GetNextFunc( const OUString& rFormula,
const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
for(sal_uInt32 j= 0; j < nCategoryCount && !*ppFDesc; ++j)
{
const IFunctionCategory* pCategory = m_pFunctionManager->getCategory(j);
boost::scoped_ptr<const IFunctionCategory> pCategory(m_pFunctionManager->getCategory(j));
const sal_uInt32 nCount = pCategory->getCount();
for(sal_uInt32 i = 0 ; i < nCount; ++i)
{
......
......@@ -60,7 +60,7 @@ namespace formula
~IFunctionManager() {}
};
class SAL_NO_VTABLE IFunctionCategory
class IFunctionCategory
{
public:
IFunctionCategory(){}
......@@ -70,8 +70,7 @@ namespace formula
virtual sal_uInt32 getNumber() const = 0;
virtual OUString getName() const = 0;
protected:
~IFunctionCategory() {}
virtual ~IFunctionCategory() {}
};
class SAL_NO_VTABLE IFunctionDescription
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment