[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Objects' (#rtl)

CallVoidConstructor

Call a constructor with no arguments

Declaration

Source position: objects.pp line 580

function CallVoidConstructor(

  Ctor: pointer;

  Obj: pointer;

  VMT: pointer

):pointer;

Description

CallVoidConstructorcalls the constructor of an object. Ctoris the address of the constructor, Objis a pointer to the instance. If it is Nil, then a new instance is allocated. VMTis a pointer to the object's VMT. The return value is a pointer to the instance.

Note that this can only be used on constructors that require no arguments.

Errors

If the constructor expects arguments, the stack may be corrupted.

See also

CallPointerConstructor

  

Call a constructor with a pointer argument.

CallPointerMethod

  

Call a method with a single pointer argument

CallVoidLocal

  

Call a local nested procedure.

CallPointerLocal

  

Call a local nested function with a pointer argument

CallVoidMethodLocal

  

Call a local procedure of a method

CallPointerMethodLocal

  

Call a local procedure of a method with a pointer argument