On Fri, 24 Jan 2003, Gustaf Neumann wrote:
Certainly, when all references are gone (stringified, only string callbacks point to an object) the object will be destroyed.... still, we would have the choice btwn traditional objects (that can be used safely in callbacks) and refcounted objects, there are many cases, where this might be useful ... i my code, i have not experienced the problem with unneeded objects (people that grew up with Java rather than C might thing differently)
I've actually experienced fewer problems with manual destruction than I imagined, but I do still stumble across problems every now and then and in a way it is an extra headache to have to work out the proper destruction point. I think it is a good idea to do what you're doing with the refcounts and to have all the facilities there for auto-destruction -- at least for when and if Tcl is ever able to provide a way to be sure that references last for as long as needed.