method

malloc

malloc(types, func = nil)
public

Allocates a C struct the types provided. The C function func is called when the instance is garbage collected.