DotNetFreeObject Function

Action

Releases the object handle, so that the garbage collector will free the object.

Include file

DotNetAPI.bdh

Syntax

DotNetFreeObject( in hObject : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hObject Handle to a .NET Object that will be released

Example

dcltrans
  transaction TMain
  var
    hObject : number;
begin
  hObject := DotNetLoadObject("bin\\Release\\MyDotNet.dll", "MyDotNet.TestClass");
  DotNetCallMethod(hObject,"TestMethod");
  DotNetFreeObject(hObject);
end TMain;