int ComObjectsProfilerFinish(ComObjectsProfilerFinishArg tArg)
tArg. Operation execution parameters.
The ComObjectsProfilerFinish operation disables memory leaks detection and saves the leaks detection log to file.
To execute the operation, in the tArg.LogFile field specify path and name of the file, to which the log is to be saved. Before executing the operation, it is recommended to execute the ComObjectsProfilerClean operation.
If after the leaks detection log is saved to file, it is also required to clear the log in the memory, set the tArg.ResetObjects field to True.
The operation results in the number of registered memory leaks.
Below is the example of disabling memory leaks detection and saving the obtained log to file.
{
"ComObjectsProfilerFinish" :
{
"tArg" :
{
"LogFile" : "D:\Work\ComLog.log",
"ResetObjects" : "true"
}
}
}
{
"ComObjectsProfilerFinishResult" : "156"
}
public static int ComObjectsProfilerFinish()
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tStart = new ComObjectsProfilerFinish()
{
tArg = new ComObjectsProfilerFinishArg()
{
LogFile = "D:\\Work\\ComLog.log",
ResetObjects = true
}
};
// Disable memory leaks detection
var result = somClient.ComObjectsProfilerFinish(tStart);
return result;
}
See also: