1Prelude.onDestroy(3kaya) Kaya module reference Prelude.onDestroy(3kaya)
2
3
4
6 Prelude::onDestroy - Register a function to call when object is garbage
7 collected
8
10 Void onDestroy( var a object, var Void(a) destroyFn )
11
13 object The object being watched
14
15 destroyFn The function to call when the object is destroyed. Takes the
16 object as its argument
17
19 If additional cleanup is needed when an object is destroyed, this func‐
20 tion registers a finalisation procedure. e.g. a record containing a
21 file handle should make sure the file is closed when the object is
22 deallocated.
23
25 Kaya standard library by Edwin Brady, Chris Morris and others
26 (kaya@kayalang.org). For further information see http://kayalang.org/
27
29 The Kaya standard library is free software; you can redistribute it
30 and/or modify it under the terms of the GNU Lesser General Public
31 License (version 2.1 or any later version) as published by the Free
32 Software Foundation.
33
34
35
36Kaya December 2010 Prelude.onDestroy(3kaya)