Q: I have been reading the docs but I can’t seem to get a direct answer. The method below returns a pointer to an image buffer:
const UChar* pdftron::PDF::PDFDraw::GetBitmap()
Is that data buffer cleaned up (deleted) by PDFTron? Or do I have to free the memory after I am done with it? It returns a const reference so am I right to assume that PDFTron cleans up the allocated memory?
The memory returned by GetBitmap() is owned by the PDFDraw object, so you should not delete it.