From e5f504b6c5dc34337cc0b316b4a7b1fca7e614b1 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 17 Aug 2019 22:13:37 -0400 Subject: Use SparseOHArray in QPDF_Array --- include/qpdf/QPDFObjectHandle.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index ad542c09..4f18cbda 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -544,6 +544,10 @@ class QPDFObjectHandle int getArrayNItems(); QPDF_DLL QPDFObjectHandle getArrayItem(int n); + // Note: QPDF arrays internally optimize memory for arrays + // containing lots of nulls. Calling getArrayAsVector may cause a + // lot of memory to be allocated for very large arrays with lots + // of nulls. QPDF_DLL std::vector getArrayAsVector(); QPDF_DLL @@ -932,7 +936,6 @@ class QPDFObjectHandle class ReleaseResolver { friend class QPDF_Dictionary; - friend class QPDF_Array; friend class QPDF_Stream; friend class SparseOHArray; private: -- cgit v1.2.3-54-g00ecf