Skip to Content
0

MEMORY LEAK in SAP B1 DI API

Nov 24, 2016 at 01:52 AM

249

avatar image
Former Member

I am using following code ,

company.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
var productionTrees = company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees) as SAPbobsCOM.ProductTrees;
productionTrees.GetByKey(itemcode);

var bomxml = productionTrees.GetAsXML();
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(productionTrees);
productionTrees = null;
GC.Collect();


This doesn't release any Memory. Please suggest.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Nov 24, 2016 at 07:35 AM
1

Hi Muhammad,

Did you use a memory profiler to check if the memory has been reclaimed? Using the memory displayed in the Task Manager is not a very accurate indicator of memory usage.

Pedro Magueija

LinkedIn | Twitter | Blog

Share
10 |10000 characters needed characters left characters exceeded