[bug report 2040] Vserver, NOTE 2. HOW TO write client/server apps

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Dec 13 21:56:17 CST 2006


On 12/06/13 7:19 PM, "Charles Yeomans" <charles at declareSub.com> wrote:

>> 
>>> AGREE. So the same must do code as
>> 
>>>>>     object1.open
>>>>>             object2.open()
>>>>> 
>>>>>             object2.close()
>>>        object1 = nil
>> 
>>> Ivan, I believe this works in our case, right ?
>> 
>> Yes. Destructor of connection close self before destroying.
> 
> It appears to do so in the simplest test.  But this code
> 
>    dim c as new VConnection("localhost", "sa", "sa")
>    c.Open
>    dim db as new VDatabase(c)
>    db.Open new FolderItem("testdb")
>    db.Close
> 
> still eats up connections.

Charles, wait.

Above YOU and ME have told that Vconnection destructor must close
connection.

Right?

Where you see in this code call of destructor of Vconnection?

You think it must be called on exit of method?
And it is not called? This can be checked in the V4RB_LOG.

Then may be this is a RB bug ???


> My report of this was closed with the
> comment "THIS IS correct behavior!".  But I fail to see how it can
> be.  All databases using this connection are closed.  Yet when the
> connection object is destroyed, the connection is not closed.

Because connection cannot be closed by lower-lever db object.

Above you show case when DESTRUCTOR of Vconnection is not called.
Am I right?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list