From 1d56cee9c433854661a0c62765a9f1b0e51efd36 Mon Sep 17 00:00:00 2001 From: anisite Date: Sat, 27 Apr 2024 13:37:19 -0400 Subject: [PATCH] Update PdfReader.cs --- src/iTextSharp.LGPLv2.Core/iTextSharp/text/pdf/PdfReader.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/iTextSharp.LGPLv2.Core/iTextSharp/text/pdf/PdfReader.cs b/src/iTextSharp.LGPLv2.Core/iTextSharp/text/pdf/PdfReader.cs index c0483df..531cb4b 100644 --- a/src/iTextSharp.LGPLv2.Core/iTextSharp/text/pdf/PdfReader.cs +++ b/src/iTextSharp.LGPLv2.Core/iTextSharp/text/pdf/PdfReader.cs @@ -594,6 +594,9 @@ public bool Tampered public void Dispose() { Close(); + + // Ensure large pdf cleaned up before continuing + _xrefObj.Clear(); } /// @@ -5216,4 +5219,4 @@ private void pushPageAttributes(PdfDictionary nodePages) _pageInh.Add(dic); } } -} \ No newline at end of file +}