Hi
Someone might find this useful - a Garbage Collector to free up memory by destroying all Inactive Deferred Views.
Problem we have is that, after 3-8 hours of using a WinApp the user may have opened a bunch of views /reports that are no longer active. But these are still consuming resources and more importantly memory (RAM).
In a shared environment (i.e. Remote Desktop Server) this can be expensive and tends to slow down the server/environment.
The cGarbageCollector seeks out these inactive views and destroys them - freeing up resources. These views will and can be re-created again as per normal, if the user needs them again.
Attached is the cGarbageCollector.pkg + CollectGarbage.vw to test/execute the Garbage Collector (just drop it in the Order Entry WS)
Usage:
Code:
Object oClientArea is a ClientArea
...
Object oGarbageCollector is a cGarbageCollector
Move (Self) to ghoGarbageCollector
End_Object
...
End_Object
Send DoGarbageCollection of ghoGarbageCollector
Happy 2023 !!!