method

malloc

malloc(types, func=nil)
public

Allocates a C union the types provided.

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