Added FPDFPageObj_Destroy() for freeing page objects created
Bug=pdfium:854
Change-Id: I227418cdcb77e0aa7d48338f1ee0d753cef6bfdb
Reviewed-on: https://pdfium-review.googlesource.com/10390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index a7ee212..91b966c 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -201,6 +201,10 @@
return pPage && pPage->BackgroundAlphaNeeded();
}
+DLLEXPORT void STDCALL FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_obj) {
+ delete CPDFPageObjectFromFPDFPageObject(page_obj);
+}
+
DLLEXPORT FPDF_BOOL STDCALL
FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)