Command disabled: backlink

Garbage Collector

System garbage collector is a service that automatically reclaims unused memory. See GC Class for details.

If using ActiveX you notice that the garbage collector rarely cleans the main memory, in your program code you can decrement the count of references to object before the garbage collector is activated. To do this, use the following code (VB):

	System.Runtime.InteropServices.Marshal.ReleaseComObject(object)
	object = Nothing

It will allow you to free the memory beeing used by an object if its references count is zero. See Marshal.ReleaseComObject Method for more details.

An alternative way to clean the memory is a method of forced garbage collection (VB):

	GB.Collect()

See GC.Collect Method for the full description of the method.

Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam