Hi,
I'm working on a class that includes a haxe.Timer instance as an internal implementation detail. According to the docs, a running timer could prevent my program from terminating.
How do I guarantee that this terminates/closes, especially if I have to create some sort of "stop" method that the user might forget to call?
I thought about using a destructor or something like C#'s "disposable" interface (the user can call "dispose" or you can wire up the class so that the GC calls it automatically when garbage-collected). But, it seems like I can't write a destructor in Haxe.
How have others worked around this kind of problem?
--Ashiq