[Xotcl] destroy invoked by object move?
Scott Gargash
scottg at atc.creative.com
Wed Mar 15 04:51:07 CET 2006
Hello,
I'm trying to make a pool of managed resources. At the start-of-day, the pool is filled with a
number of object instances. A client can retrieve an object instance from the pool, and I have a
mixin class that overides destroy to automatically returns the instance to the pool upon
destruction.
The objects are all initially created as children of the pool, and it was my intent to have an
acquiring object take ownership of the instance by move'ing the instance into itself. However, it
seems that move'ing an object invokes the destroy method, which then triggers my mixin and returns
it to the pool.
It seems that move shouldn't destroy the object, as it's only renaming it. Is this the intended
behavior? Would anything bad happen if, instead of move'ing the instance, I were to use Tcl's rename
command to move the object? Is there a better way to get where I'm trying to go?
Scott
BTW, I notice there's not much activity on this mailing list. XOTcl's object model is sufficiently
new to me that I've got lots of questions on the "right" way to do things, but I hate to be filling
up everyone's mailbox. Is there a more appropriate place to be asking questions?
Notice
The information in this message is confidential and may be legally privileged. It is intended
solely for the addressee. Access to this message by anyone else is unauthorized. If you are not
the intended recipient, any disclosure, copying or distribution of the message, or any action
taken by you in reliance on it, is prohibited and may be unlawful. If you have received this
message in error, please delete it and contact the sender immediately. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060314/189c910d/attachment.html
More information about the Xotcl
mailing list