WeakAddressOf

From Real Software Documentation

Jump to: navigation, search
Operator

Creates a Delegate, just like AddressOf does, with the difference that it references the method's object instance using a WeakRef internally.

Notes

It can only be used with instance methods of classes, not with shared methods and global methods from modules (use AddressOf for those).

If the delegate method is invoked after the object has been destroyed, an exception will be raised.

Syntax

delegate=WeakAddressOf methodName

Part Description
Delegate A delegate that references methodName. The Delegate automatically converts to a Ptr.
methodName The method to which you want a pointer.

See Also

MemoryBlock function; AddressOf, Declare statement; Delegate, Ptr data types; Operator Precedence.

Personal tools