> -----Original Message-----
> From: Sam Liddicott [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 05:22
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] Destruct order/What is reference counted?
> 
> 
> Are resources refence counted, or variables?
> 
> I have a muscat_module method I wrote which is of the form:
> 
> $new_resource=make_new_object($old_resource);
> 
> each resource is a C++ object, and I have to stop $old_resource being
> disposed of until $new_resource has also been disposed of.

To be more accurate, when old_resource is disposed of it will dispose of any
remaining underlying new_resource objects, leaving a load of invalid
new_resource's which will then be free'd later - unsuccessfully.

So I either need to preserve the life of the underlying old_resource until
all visible new_resources are finished, or find some way to mark the
remaining new_resources as invalid.

> It seems like there is no destroy order at end-of-page time?
> Whats the best way to enforce it?
> 
> I think I am going to have to wrap all the C++ objects in more C++ to
> implement reference counting- aggh.  Surely there is another way?
> 
> Sam
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to