(malloc-struct) ( class -- struct )
Factor handbook » C library interface » Struct classes » Creating instances of structs

Prev:(struct) ( class -- struct )
Next:S{


Vocabulary
classes.struct

Inputs
classa class


Outputs
structa struct


Word description
Allocates unmanaged C heap memory for a new struct of the specified class. The new struct's slots are left uninitialized; to initialize the allocated memory with the slots' initial values, use malloc-struct. The struct should be freed when it is no longer needed.

See also
(struct)

Definition