Hi Mahesh,
On Tue, 2014-07-08 at 07:47 +0000, Mahesh Patil wrote:
I have problem in libreoffice code. Libreoffice is not releasing
memory after converting document to pdf. Can someone explain me how to
release memory. which function is called for this.
Hmm - of course, it is quite possible / probable that there are memory
leaks - unfortunately.
Reference < XCloseable > xClose( xDoc, UNO_QUERY );
if ( xClose.is() )
xClose->close( sal_True );
else
{
Reference < XComponent > xComp( xDoc, UNO_QUERY );
if ( xComp.is() )
xComp->dispose();
}
It is possible that you want to do the dispose after the close
unconditionally; but I'm really no expert here.
Have you considered using the LibreOfficeKit API in 4.3 ? (try a recent
4.3.0 rc) that provides a native C/C++ API for linking directly into the
LibreOffice process to do this work - which should make debugging rather
easier.
Beyond that I'd suggest running the soffice.bin binary under lsan or
valgrind to detect leaks and see where the memory is lurking after that
cycle. With some clear leak traces it shouldn't be too hard to work out
what's going on. Unfortunately it is possible that what is apparently
leaked is image caches etc. that are cleaned up at exit (but not on
document close) which would hide the leaks.
How much are you loosing ?
Thanks,
Michael.
--
michael.meeks@collabora.com <><, Pseudo Engineer, itinerant idiot
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.