|
From: Ype K. <yk...@xs...> - 2001-12-18 18:48:17
|
Samuele, Finn, > > >> Unfortunately Jython 2.1b1 doesn't inform you of the exception in the >> way it should. When I fix that bug, your program will the same way, but >> it will write: >> > >The point is that java simply discards the exceptions thrown in finalizers. >So we should catch them and print them explicitly for the __del__ >invocation in the finalizer. >OTOH there is no leak. > >regards, Samuele Pedroni. Thanks a lot to both of you. I think I am understanding more of the 'NameError: tracer' I reported before. It could well be that it is also running a in cleared namespace. I have a program that execfile()'s python modules in the namespace of a new.module, ie. in it's __dict__ field. This programs clears the __dict__ after the execfile in order to be able to reuse the module object. However this seems to cause a NameError once in a while, ie. when another thread tries to reference the namespace of the module that has just been execfile()'d. Should this program, instead of clearing the namespaces, just remove all it's references to these namespaces, so they can be used as long as necessary? Regards, Ype |