Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


Hello,

I made this test:
- launch Writer
- type 3 words and use a different font for each of them
- export in pdf

Using GDIView, it seems that each time I export in PDF, the number of GDI
increases.
Trying to use Windbg !htrace -enable, then diff 

It seems LO leaks in VistaFilePickerImpl::impl_sta_ShowDialogModal
Indeed, after:
1037          if (iSave.is())
1038              hResult = iSave->Show( m_hParentWindow ); // parent window
needed

See
https://opengrok.libreoffice.org/xref/core/fpicker/source/win32/VistaFilePickerImpl.cxx?r=ffa636ba#1037
then leave the function, the GDI number doesn't decrease.

"iSave" is declared some lines above, like this:
TFileSaveDialog iSave = m_iDialogSave;

"TFileSaveDialog " is declared like this:
typedef ComPtr< IFileSaveDialog     , IID_IFileSaveDialog  ,
CLSID_FileSaveDialog > TFileSaveDialog;

ComPtr is a specific class which should release handle when the instance is
destroyed (see
https://opengrok.libreoffice.org/xref/core/fpicker/source/win32/comptr.hxx?r=591db0f9#30).

I wonder if this mechanism really works as expected.

I mean, shouldn't we try to release manually in impl_sta_ShowDialogModal ?

I'm quite a beginner with Windbg + GDI stuff so my analysis may be very
incomplete or even wrong.

Julien




--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html

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.