About consumption of GDI

julien2412 serval2412 at yahoo.fr
Mon May 18 09:23:15 UTC 2020


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
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

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

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.


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

More information about the LibreOffice mailing list