Apache OpenOffice (AOO) Bugzilla – Issue 120668
SdrModel, the member objects created in SdrModel::ImpCreateTables() leaks
Last modified: 2016-04-09 10:39:37 UTC
In api void SdrModel::ImpCreateTables() { // der Writer hat seinen eigenen ColorTable if (!bExtColorTable) pColorTable=new XColorTable(aTablePath,(XOutdevItemPool*)pItemPool); pDashList =new XDashList (aTablePath,(XOutdevItemPool*)pItemPool); pLineEndList =new XLineEndList (aTablePath,(XOutdevItemPool*)pItemPool); pHatchList =new XHatchList (aTablePath,(XOutdevItemPool*)pItemPool); pGradientList=new XGradientList(aTablePath,(XOutdevItemPool*)pItemPool); pBitmapList =new XBitmapList (aTablePath,(XOutdevItemPool*)pItemPool); } Next time, when calling SdrModel::Setxxx(), for ex, void SetColorTable(XColorTable* pTable) { pColorTable=pTable; } The object is overwritten without free.
Created attachment 79073 [details] fix code patch
Comment on attachment 79073 [details] fix code patch Sorry, the patch still has problem, need more study.
Created attachment 79074 [details] refix code patch Move these api from header file to source file and add delete action, void SdrModel::SetColorTable(XColorTable* pTable) void SdrModel::SetDashList(XDashList* pList) void SdrModel::SetLineEndList(XLineEndList* pList) void SdrModel::SetHatchList(XHatchList* pList) void SdrModel::SetGradientList(XGradientList* pList) void SdrModel::SetBitmapList(XBitmapList* pList)
Comment on attachment 79074 [details] refix code patch remove review tag since long time no response.
"zhangjf" committed SVN revision 1380436 into trunk: #i120668#, when calling SdrModel::Setxxx(), need free old object at firstFoun...
Change to resolved state.
fixed in 4.0.0