On Wed, Jun 04, 2003 at 11:05:34AM +0200, Leopold Toetsch wrote:
> Graham Barr <[EMAIL PROTECTED]> wrote:
> 
> > I ask becasue what happens if an object actually wants
> > to use its contents during its DESTROY ?
> 
> > For example Net::POP3::DESTROY will send a reset command to its
> > server if the user did not call the quit method first. But how
> > could it do this if the socket PMC was already freed ?
> 
> PMCs which have their own resources have the active_destroy_FLAG set
> (this is done during init/clone). Now when such an object is found
> unreferenced during a DOD run, the destroy() vtable method is called for
> this object. The object should now cleanup itself (close sockets, free
> system memory, ...). Thereafter the object is put onto the free list.

I may be missing something here. But within the resources of an object may
be other PMCs. As those PMCs will not be referenced from anywhere else
what is to stop the DoD run from freeing those before it freed the object ?

Graham.

Reply via email to