Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clean up .NET resources
Message
 
To
06/05/2008 15:23:34
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01315414
Message ID:
01315423
Views:
20
Remember to setup to null the loNetObj reference so the .NET Garbage collector can Finalize the object.

In .NET you don't have deterministic finalization, so you can't tell in exactly what moment the Finalizers for your .NET objects will run. You can invoke the static method System::GC::Collect to cause the Garbage Collector to perform collection of the objects, but it is usually better to leave that to the .NET runtime.


>Hello,
>
>I am using the NET Extender in VFP and have the following question:
>
>How can I clean up properly the resources when I use an assembly.
>
>For instance I have an assembly that has a class:
>
>lcAssembly = "XEngine.exe"
>lcClass = "xEngine.Form1"
>loNetObj = CLRNewObject(lcClass,lcAssembly)
>loNetObj.Show()
>
>now to close the form I issue:
>
>loNetObj.Close()
>
>But the XEngine.exe is still loaded somehow in memory. How can I clean up the resources?
Previous
Reply
Map
View

Click here to load this message in the networking platform