aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 3d011c1d..fa8aae7f 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -248,6 +248,17 @@ QPDFObjectHandle::operator!=(QPDFObjectHandle const& rhs) const
return this->obj != rhs.obj;
}
+void
+QPDFObjectHandle::reset()
+{
+ // Recursively remove association with any QPDF object. This
+ // method may only be called during final destruction. See
+ // comments in QPDF::~QPDF().
+ if (!isIndirect()) {
+ this->obj->reset();
+ }
+}
+
qpdf_object_type_e
QPDFObjectHandle::getTypeCode()
{