a tuple named word with a single slot holding a c-ptr
•
a dispose method on the tuple which calls word with the c-ptr
•
a pair of words, &word and |word, which call &dispose and |dispose with a new instance of the tuple
The word must be defined in the current vocabulary, and must have stack effect ( c-ptr -- ).
Examples Suppose you are writing a binding to the GLib library, which as a g_object_unref function. Then you can define the function and destructor like so,