|
Hi,
The recent talk about printing has made me focus on PrintDialog a bit. It
looks to me as if it's leaking global "resources". I don't know if this is
really true, or -- if true -- really an issue, but I thought it worth
mentioning.
Anyway, once the dialog has been confirmed, it has (I think) "allocated" a DC
for the printer canvas, and two global memory blocks for the DEVMODE and
DEVNAMES structures referenced from the PRINTDLG's hDevMode and hDevName
fields. The DC will be cleaned up if it is ever used to create a
PrinterCanvas, but not otherwise. The other two structures are not cleaned up
at all (that I can see).
FWIW, the printing example in MSDN does clean up this stuff, doing a DeleteDC()
and two GlobalFree()s.
-- chris
|