Prelude.onDestroy3kaya
Register a function to call when object is garbage collected
Usage
Void onDestroy( var a object, var Void(a) destroyFn )
Arguments
object The object being watched
destroyFn The function to call when the object is destroyed. Takes the object as its argument
Overview
If additional cleanup is needed when an object is destroyed, this function registers a finalisation procedure. e.g. a record containing a file handle should make sure the file is closed when the object is deallocated.
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.