On 07/02/2009 02:39 PM, Joachim Jaeckel wrote:
Hello,

'finalize' is called, if the object will be garbage collected. But is
there also a method, or exist a hook, that a method could be called, if
the vm ends?

I want to close my open files in a method of my object and write a last
message into the files, before the vm ends.

Files are closed automatically.

However, you can use

ObjectMemory addDependent: self.

and then "self" will get a bunch of events dispatched via the #update: method. grep "update:" in kernel/*.st for an example of its usage.

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to