[V4Rb 2] VDatabase.Close

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jun 1 20:32:22 CDT 2005


On 6/1/05 7:31 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:

>> Charles, I am not sure why you think that there should not be a
>> database close method. Or am I misunderstanding? Imagine a program
>> that can open multiple databases in the course of an execution, think
>> databases as different documents or datasets. If there was no option
>> to close a database, any of the databases would stay open until
>> program quits, requiring substantially more resources. If users says,
>> he/she is done with a given dataset (database), we should be able to
>> close it and free resources for another one.
> 
> Sure.  And a database should be closed when the object is destroyed, as
> I say in another message.  I shouldn't need to call VDatabase.Close
> explicitly in REALbasic, because REALbasic has destructors, as opposed
> to Java, for example.

Charles,

What you try point is not very correct. IMHO.

IT will be correct IF constructor do automatic open().
But it not do this.

Technique which you describe is very common for C++ developers.
    constructor do some action
    destructor do its alternative.

I will not explain advantages of this technique.
They are described in the "C++ PL" of Stroustrup.

MAY BE btw, this technique can be useful for RB developers!
I think 100% can be used. Than more that now RB have exceptions..
 

-- 
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