[V4Rb 2] VDatabase.Close

Charles Yeomans yeomans at desuetude.com
Wed Jun 1 12:31:34 CDT 2005


On Jun 1, 2005, at 10:56 AM, Robert Brenstein wrote:

>>
>> 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" ... :)
>>
>> --------------
>> Charles Yeomans
>>
>
> 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 Yeomans



More information about the Valentina mailing list