L
Laura Stern
Guest
It is not necessarily wrong that that the ABL side is gone but the object lives on the .NET side. What I mean by that is, if you explicitly delete the object in the ABL, we will clean up our side and our references to the .NET part of the hybrid object. But as you just said, in .NET, you cannot force the object to go away. You can only free references and hope it gets garbage collected. If there are still references on the .NET side, it will remain there. Are you using Infragistics controls? We have had many cases where the form is not GC'd in .NET because of references within Infragistics components. In fact we've logged bugs with Infragistics, but they were not resolved. Also, have you forced .NET to do its garbage collection? I wouldn't recommend putting this into the application. It is just a diagnostic technique to make sure you are not seeing objects that appear to be leaking but just haven't been GC'd yet. I believe the memory profiler will have a way of doing that. To do it programmatically, you do this: System.GC:Collect(). System.GC:WaitForPendingFinalizers(). System.GC:Collect(). What do you mean by unstable? Maybe you have gone too far in your attempt at cleaning up. Calling Dispose and doing the DELETE OBJECT on the ABL side is often enough. And you have to make sure you do this in the Closed event handler, not the Closing event handler.
Continue reading...
Continue reading...