method

malloc

malloc(types, func = nil)
public

Allocates a C struct with the types provided.

When the instance is garbage collected, the C function func is called.