Allocates a handle to the specified, managed object, to prevent it being reclaimed by garbage collection.
[Visual Basic] Public Shared Function Alloc( _ ByVal value As Object _ ) As Integer [C#] public static int Alloc( object value ); [C++] public: static int Alloc( Object* value ); [JScript] public static function Alloc( value : Object ) : int;
A handle to the 'rooted' managed object. Only of use to the caller when it comes time to 'unroot' that managed object with a call to Free or to enquire the root handle with a call to Get.
Root handles require explicit deallocation using the Free method. The object will not be reclaimed by the garbage collector until the Free method is called.
Root Class | Root Members | System.Runtime.InteropServices Namespace