Apache OpenOffice (AOO) Bugzilla – Issue 113784
chart2: SvNumberFormatter in chartmodel leaks
Last modified: 2017-05-20 11:42:14 UTC
The memory leak problem can be easily recreated by these steps, 1. new a sw document 2. insert a chart object, then it switches into embedded mode 3. close the document without saving For this simple operation, about 65 SvNumberformat objects leaks. This leak is caused by the SvNumberFormatter object leaks which is allocated in ImplChartModel::GetNumberFormatsSupplier() method.
Created attachment 71031 [details] fix code patch file (Based on OOo3.1M11 code)
Raise priority to P2.
@zhangjfibm, I do not see how the patch is related to the problem. Did you maybe attach the wrong file?
Sorry, attached wrong patch file.
Created attachment 71167 [details] patch file fix the problem
Thanks! That does the trick. And thanks for pointing to the problem! There exists a more elegant way to fix this. If we use a std::auto_ptr instead of a pure c++ pointer, we do not need to write code for proper initialization and destruction. Fixed in CWS chart49. http://hg.services.openoffice.org/cws/chart49/rev/aa59cbc86d27
zhangjfibm, please verify in CWS chart49. Thanks!
verified, than you.
reopen it because wrongly closed.
change it's status because wrongly closed.
Mark it as verified.