When you are aware that objects have gone out of scope, the only way to ensure that the OpenEdge garbage collector goes to work is to fire a method or perform some sort of other interaction with the bridge, such as creating an object. Otherwise you can manually fire the garbage collector, which causes OpenEdge to check the bridge earlier and run its own garbage collection.
To do this you would want to make a multiple pass call in order to ensure that objects that need cleaning are indeed cleaned up. The below code should accomplish this task:
System.GC:Collect(). System.GC:WaitForPendingFinalizers(). System.GC:Collect().
|