memory release in libreoffice

Michael Stahl mstahl at redhat.com
Wed Jul 9 03:11:34 PDT 2014


On 09/07/14 12:07, Michael Meeks wrote:
> 
>>         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.

no you don't - the close() is an "enhanced" alternative to dispose(),
and if a component supports XCloseable you should never call dispose()
on it.




More information about the LibreOffice mailing list