<?xml version="1.0" encoding="windows-1252"?>
<node id="166918" title="Re: Re: Re: Object reference disappearing during global destruction" created="2002-05-16 00:34:12" updated="2005-07-21 01:31:34">
<type id="11">
note</type>
<author id="144875">
erikharrison</author>
<data>
<field name="doctext">
&lt;p&gt;Let me give it a shot.&lt;/p&gt;
&lt;p&gt;First off, let me make sure I understand. You have a reference to an object, and you are dereferencing that ref in print statements, wondering whats going on, right?&lt;/p&gt;
&lt;p&gt;If you have a reference to an object, then the destruction of that reference will not invoke a call to a DESTROY method, only the objects actual destruction will. The objects destruction will occur in a pass before destruction of anything else. If you have a reference to an object, and the object is destroyed first (which it should be) the the reference points to nothing - undef. If the the scalar holding the reference to the object is itself undefed, and the object still exists, then this may be inconsistent with Perl's two pass out-of-the-pool system (where objects go first, so that their DESTROY methods can safely operate on variables in the environment). But, if you simply have a reference to the object, and you dereference that reference, then it should come up undef after global object destruction and before destruction of everything else.&lt;/p&gt;

&lt;p&gt;Hope that helps.&lt;/p&gt;

Cheers,&lt;br&gt;
Erik
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; I just realized this is my 100th post. Yay!&lt;/p&gt;</field>
<field name="root_node">
166791</field>
<field name="parent_node">
166823</field>
</data>
</node>
