Browse Source

Code quality: SnapshotRecorder should remove its cache item when one becomes disposed

Marcin Ziąbek 9 months ago
parent
commit
5ed248c669
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Source/QuestPDF/Drawing/Proxy/SnapshotRecorder.cs

+ 1 - 0
Source/QuestPDF/Drawing/Proxy/SnapshotRecorder.cs

@@ -69,6 +69,7 @@ internal class SnapshotRecorder : ElementProxy, IDisposable
             Canvas.Translate(cachePictureOffset);
             Canvas.Translate(cachePictureOffset);
             
             
             snapshot.Dispose();
             snapshot.Dispose();
+            DrawCache.Remove(PageContext.CurrentPage);
             return;
             return;
         }
         }