Memory leaks and errors in GDI+ in latest Aspose.Words for .NET

We upgraded our production Web API to use the very latest Aspose.Words and Aspose.PDF for .NET however we are now getting the following errors which we did not get in prior releases:

System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.     
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)     
at ??.(Image , Stream )     
at ??.(Stream )     
at    .(Stream )     
at Aspose.Words.Rendering.NodeRendererBase.Save(Stream stream, ImageSaveOptions saveOptions)     
at    .(ShapeBase , ShapeRenderer ,    , Boolean ,     )  ...

System.Exception: Error in CWebFileManager.File_Move_SystemIO: System.IO.IOException: Not enough memory resources are available to process this command.    ....

@Garry Could you please provide your input document along with a simple code that will allow u to reproduce the problem? We will check the issue and provide you more information.

Hi Alexey
Thanks for your response.
We tracked the problem down to other code. It seems that Aspose was the first to diagnose the memory issue, but it appears that Aspose was not responsible for the GDI+ problem.

Kind Regards, Garry.

@Garry It is perfect that you managed to resolve the issue. Please feel free to ask in case of any further questions about Aspose.Words.