|
@@ -46,6 +46,7 @@ namespace QuestPDF.Elements
|
|
|
foreach (var cacheItem in Cache)
|
|
foreach (var cacheItem in Cache)
|
|
|
cacheItem.Image?.Dispose();
|
|
cacheItem.Image?.Dispose();
|
|
|
|
|
|
|
|
|
|
+ Cache.Clear();
|
|
|
GC.SuppressFinalize(this);
|
|
GC.SuppressFinalize(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -75,8 +76,6 @@ namespace QuestPDF.Elements
|
|
|
if (targetImage != null)
|
|
if (targetImage != null)
|
|
|
Canvas.DrawImage(targetImage, availableSpace);
|
|
Canvas.DrawImage(targetImage, availableSpace);
|
|
|
|
|
|
|
|
- targetImage?.Dispose();
|
|
|
|
|
-
|
|
|
|
|
GenerationTime += (float) stopWatch.Elapsed.TotalMilliseconds;
|
|
GenerationTime += (float) stopWatch.Elapsed.TotalMilliseconds;
|
|
|
DrawnImageSize += targetImage?.EncodedDataSize ?? 0;
|
|
DrawnImageSize += targetImage?.EncodedDataSize ?? 0;
|
|
|
|
|
|