RB Destructors/Destroying Stuff

Charles Yeomans yeomans at desuetude.com
Fri Jun 18 09:38:03 CDT 2004


On Jun 17, 2004, at 3:34 PM, Ian Devaney wrote:

>
> My vServer app will involve people signing on and off.
>
> When a user signs off I am trying to nil references to databases etc.
>
> Firstly, even though I close databases and set their references to 
> nil, RB shows the names of tables, references to vVarChars and things 
> when I list object references.
>
> Obvioulsy, as a user repeatedly signs on and off these refs and memory 
> usage will pile up.
>
> I tried putting a Destructor method into my db classes that killed all 
> the objects but this doesn't even seem to be being called.

This means that the reference count of the object is > 0.
>
> Even when I call it manually it doesn't alter the reference count.

This is correct behavior.

>
> I'm using RB 5.5.2.
>
> What is the best way around this?

It sounds like you have a reference somewhere else that you're 
overlooking.

Charles Yeomans



More information about the Valentina mailing list