To my mind, the following militates against your theory: The parent only forks the child processes and terminates afterwards, it does not create objects. Objects are created by its child processes only. So I expect the objects to be destroyed only when the child processes terminate. In addition, child processes might run longer than the parent exists, most of them do. So the parent has already terminated when at least some child-created objects are destroyed. And the behavior is always the same whether the child dies before the parent does or vice versa: DESTROY is called twice. To sum it up, I am in doubt about the objects being really destroyed by both the child and the parent...
-----Ursprüngliche Nachricht----- Von: Randal L. Schwartz [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 13. Juni 2006 16:53 An: beginners@perl.org Betreff: Re: DESTROY executed twice >>>>> ""Glaessl," == "Glaessl, Danilo" <[EMAIL PROTECTED]> writes: "Glaessl,> I have a OOP problem. I wrote a script that forks several child "Glaessl,> processes that in turn create instances of the same class: The DESTROY is being executed in both the parent and child. There's really no way around that... because you are indeed destroying the object in both the parent and the child. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>