I am rewriting some code to eliminate global variables and made a class constructor/destructor handle cleanup of some third party library resources, but I am concerned about
The members are initialized in the order they are declared, top to bottom
PoDoFo::PdfOutputDevice device; PoDoFo::PdfStreamedDocument document; PoDoFo::PdfPainter painter;
so it is safe to use device to initialize document.
device
document