From: Rick M. <obj...@gm...> - 2008-12-12 17:02:07
|
Class objects can be a bit dicey for getting an uninit method run, so you probably can't rely on them. Part of the problem is getting them to go out of scope in the first place. There a lots of things that can keep them from going out of scope when you'd like, including still referenced instances of the classes (and the subclasses list of its superclasses). There are usually a few weak references to class objects that will take a GC cycle or two to get cleared so that the uninits can run. Rick On Fri, Dec 12, 2008 at 11:44 AM, Mark Miesfeld <mie...@gm...> wrote: > It looks to me that if you define a class uninit() method it is not called. > > Since a class object is just an object, I though an uninit() method > would run when the Rexx program ends, when the interpreter does its > clean up. > > o = .MyClass~new > o~echo("Hello World") > > > ::class 'MyClass' > ::method uninit class > say 'In uninit of my class.' > > ::method echo > use strict arg line > say line > > I was hoping to see: > > Hello World > In uninit of my class. > > But I only see Hello World > > -- > Mark Miesfeld > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |