[Seaside] Where can I put "clean up" code
Avi Bryant
avi.bryant at gmail.com
Sat May 7 11:05:37 CEST 2005
On 5/6/05, Michael <sangria at gmx.net> wrote:
> Hi
> I would like to retrieve my data from a RequestBroker. I have a subclass
> of WAComponent
> (For example WATest).
>
> In WATest>>initialize I have this code: client := RequestBroker
> newStstTcpAtPort: 4243.
> In WATest>>renderContentOn I load the current data every time the method
> gets called.
>
> No I would like to know where I should place the "client close"
> statement. This statement
> should be executed when Seaside abandons the instance of WATest.
Hi Michael,
There's no way (other than the standard Squeak or VW finalization
mechanisms) to tell when a component instance gets GCd. However, I'd
recommend setting up such connections at the session level instead,
using a custom WASession subclass. You can then override
#unregistered and put any clean up code there.
Cheers,
Avi
More information about the Seaside
mailing list