[V4Rb 2] VDatabase.Close

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jun 1 19:03:10 CDT 2005


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

>>> Is VDatabase.Close called somewhere in a destructor?  I recall that
>>> this was a bit of an issue with V4Rb 1, at least for Windows.
>> 
>> You mean automatically ?
>> 
>> Yes kernel defend self from such mistake.
>> 
>> But still will be good if developer do
>> 
>>     db.close
>>     db = nil
> 
> I don't see why it is a mistake not to call Close.  Indeed, it is a
> mistake in my opinion for there to be a Close method.  Perhaps you've
> heard of "resource acquisition is initialization" ... :)

What about this:

    db = new ...

        db.open
            ...
        db.close


        db.open
            ...
        db.close


    db = nil


As you see each action which allocate resources have pair which deallocate
them.


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