I am running into issues with Aspose.PSD leaving a large amount of allocated memory when the portion of my code that actually uses Aspose finishes. I am not sure why it is not being cleaned up by GC for many reasons including the facts that the class that utilizes Aspose is disposed of and the thread that the class and Aspose runs on gets terminated before a GC collection is called. The following image is a screenshot of a diagnostic session with the program. At about 3:34 is when the thread Aspose is running on is terminated and where the memory usage should go down but doesn’t. In the Call Tree, Aspose.PSD.Image.Save takes the most memory by far with another large memory hog being a function (not in the screenshot) that analyzes the int[] returned by Aspose.PSD.RasterImage.LoadArgb32Pixels.
image.png (109.2 KB)
I have tried various solutions to this issue, but none have shown any progress. The program is intended to be used to export individual layers as .pngs if that helps at all. I have attached the diagnostic file here: Memory Leak Issue - Google Drive
Edit: I added an example .psd file to the above Google Drive. It is a version of the .psd file the screenshot is taken from with all the rasterized image layers being turned to all white or all black. It still has the memory issue though.