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

Prev:<struct-boa> ( class -- quot: ( ... -- struct ) )
Next:memory>struct ( ptr class -- struct )


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 initialized to their initial values. The struct should be freed when it is no longer needed.

See also
<struct>, <struct-boa>, memory>struct

Definition