I. Processing PS/EPS documents.
With a simple application, iterating 1000 times over the same input file and attempt transforming it into a image, it was noticed a continuous growth of memory allocated to the process. Here is the Main
static void Main(string args)
for (int i = 0; i < 1000; i++)
And the EPSRender code (inspired from “https://docs.aspose.com/page/net/convert-postscript-to-image/”):
public static class EPSRender
public static void RegisterAsposeLicenses()
var license = new License();
Console.WriteLine(“Aspose.Page license set successfully.”);
private static readonly ImageSaveOptions bitmapOptions = new ImageSaveOptions()
JpegQualityLevel = 100,
SupressErrors = true
public static void Render(string inputFileName, string outputFileName)
FileStream psStream = new FileStream(inputFileName, FileMode.Open, FileAccess.Read);
PsDocument document = new PsDocument(psStream);
ImageSaveOptions options = new ImageSaveOptions(true);
ImageDevice device = new ImageDevice();
As it can be seen within the code, the Dispose and garbage collection was even forced after each iteration, hoping that this is going to clear things up. However, at the end of the 1000 iterations, the memory was significantly big with no sign of releasing. This is how the snapshot looks like:
The NuGet package used for this application was Aspose.Page v.20.7.0
Question: The PsDocument class does not have the IDispose interface. Is there a different way of releasing the resources allocated by it? Or this is in fact a memory leak?
II. Upgrading to the latest Aspose.Page 20.8.0.
Using the same sample application .Net Core console application, but this time with the latest Aspose.Page library available into the NuGet repository, the compilation ends up into a bunch of errors:
After looking into the folder where the libraries are stored, the size of the dll was zero.
If the application is having the reference to version 20.7.0 restored, everything comes back to normal.
Question: Is the support for .NET Core dropped for this library or is just a deployment issue?