[Seaside] Object Destruction (or how to destroy instance)
ssastre at seaswork.com
Wed Sep 12 11:56:10 UTC 2007
> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> de Oleg Richards
> Enviado el: Miércoles, 12 de Septiembre de 2007 05:43
> Para: seaside at lists.squeakfoundation.org
> Asunto: [Seaside] Object Destruction (or how to destroy instance)
> Hello Guys!
> Maybe this question is more about smalltalk than about
> seaside, so i'm sorry.
> In my reporting application i have following problem:
> Some components of my seaside application working with
> Business Model copies.
> I do it to have ability to revert changes. If user wants to
> save changes, database collection just replaces old business
> objects with their updated copies. So everything works just fine.
> But there is a question: If i ask VisualWorks to show all
> instances of Business Model, i can also see old models, which
> were replaced by newer ones in DB collections.
> So some instances "just flying
> in the air". How can i destroy them (something like calling
> destructor in C++). Or thats a not a problem and they will be
> killed by garbage collector sometime? If so, when they will be killed?
> Cheers, Oleg
Probably the instances are not that *in the air* as you may think. This
could happen if at least one object has direct references to them (or a root
of the graph of them). Make a double check to see if you really make them
nobody knows them anymore. The rest of the work is garbage collectors magic,
More information about the seaside