>>>>> "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:
Matt> So there's never a full loop. When Object above goes out of scope, it
Matt> calls DESTROY, which gets marshalled into the ObjectImpl's DESTROY method,
Matt> allowing you to remove circular refs in your DESTROY method. I'm so
Matt> chuffed with this... can you tell?
This method (gah) fails when you are able to return a sub-object to a
caller. So like any of the find-node thingies will have to do, you'll
get the caller holding a pointer to a subelement, and then when the
top-level pointer goes out of scope, you get DESTROY called on the
children when in fact they don't need to be DESTROYed because there's
still a pointer "inside" the structure.
Or are you careful to return a wrapper'ed object for *each* return
value? That'd be expensive. And incomplete, because now all the
wrappers have to cooperate with each other to determine when the last
*wrapper* goes away... you end up reimplementing the ref count in Perl
code. Gah!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <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!
---
You are currently subscribed to perl-xml as: [[email protected]]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]