I am using ASPOSE Slides as a container (I am using slides-cloud:24.4) and when I am calling DeleteUnusedLayoutSlidesOnline() method from my C# code I have Aspose.Slides.Cloud.Sdk.ApiException: ‘Out of memory.’ exception. Seems like it does not depend on PC RAM (I have 32 GB).
How I can fix it?
Thanks.
The “Out of memory” exception you are encountering when calling the DeleteUnusedLayoutSlidesOnline
method may be related to the size of the presentation you are working with, especially if it contains large images or complex elements. Although you have sufficient RAM (32 GB), the memory required to process the presentation can exceed available resources due to how images and other elements are handled in memory.
Here are some steps you can take to potentially resolve this issue:
-
Optimize Presentation Size: Before calling the
DeleteUnusedLayoutSlidesOnline
method, try to reduce the size of your presentation. This can include compressing images or removing unnecessary elements. -
Increase Memory Allocation: If you are running this in a constrained environment (like a cloud service), ensure that the service has enough memory allocated for processing large presentations.
-
Load Presentation in Smaller Chunks: If possible, consider breaking down the presentation into smaller parts and processing them individually. This can help manage memory usage more effectively.
-
Check for Memory Leaks: Ensure that your application is not leaking memory elsewhere, which could contribute to the out-of-memory error.
-
Update Aspose.Slides: Make sure you are using the latest version of Aspose.Slides, as updates may include performance improvements and bug fixes that could resolve memory issues.
If these suggestions do not resolve the issue, consider reaching out to Aspose support for further assistance, as they may have more specific insights into memory management for the DeleteUnusedLayoutSlidesOnline
method.
If you have any additional details about the presentation or the specific context in which the error occurs, please share them for more tailored advice.
This topic has been moved to the related forum: DeleteUnusedLayoutSlidesOnline Method Throws Out of Memory Error - Free Support Forum - aspose.cloud