Hello! Wednesday, May 26, 2004, 18:40:39, Dirk wrote:
>> The "global destruction" starting earlier than destructor of this class. >> Try to undef class object before exit program. DBN> Lev is onto something here. When I place $Log = undef just before the exit DBN> in MovePDF, the filehandle exists in AmsLog and can be closed. Very DBN> interesting. While this is a solution, this is probably not the one that I DBN> will use as I would have to change every affected program. At this point in DBN> time, I have changed the LogClose method to check if the filehandle is DBN> defined prior to closing it. DBN> I wonder if anyone can shed some light on the timing of everything that DBN> happens at normal program termination concerning the de-allocation of DBN> objects, etc. Some light from Camel book 3rd edition, 12.6.1. Garbage Collection with DESTROY Methods: "When an interpreter shuts down, all its objects are destroyed, which is important for multithreaded or embedded Perl applications. Objects are always destroyed in a separate pass before ordinary references. This is to prevent DESTROY methods from using references that have themselves been destroyed." But something wrong in ActiveState Perl ;-(( Are objects destroyed earlier than references and filehandles? I found two ways to avoid errors: 1. Rename DESTROY and manually call it like ordinary object method. 2. Objects must destroyed before "global destruction" (like above). -- Best regards, Lev _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs