C++: Who owns pdftron::PDF::PDFDraw::GetBitmap() ?

58 views
Skip to first unread message

Support

unread,
Mar 12, 2014, 4:34:19 PM3/12/14
to pdfne...@googlegroups.com

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?

------
A:

The memory returned by GetBitmap() is owned by the PDFDraw object, so you should not delete it.

Reply all
Reply to author
Forward
0 new messages