[V4Rb 2] VDatabase.Close

Charles Yeomans yeomans at desuetude.com
Wed Jun 1 14:28:33 CDT 2005


On Jun 1, 2005, at 1:55 PM, Ruslan Zasukhin wrote:

> On 6/1/05 8:47 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:
>
>> But constructors and destructors in REALbasic behave differently than
>> they do in C++.  In REALbasic, destructors are always called, for
>> instance, whether or not the constructor succeeds.
>
> Nothing good here.
> C++ gurus have agree that no sense call destructor for non-complete 
> object.
>
> You sure that RB do this ?
> Check this very carefully.

I have checked it carefully.  Keep in mind that a REALbasic constructor 
might more properly be called an "initializer"; the object is ready to 
go before the constructor is called.
>
> IMHO REAL is going get big troubles then.
>
>> They are essentially hooks that allow one to execute some code 
>> immediately
>> after object creation
>
>     after creation? You mean on fail of creation ?

If object creation fails, then I don't know what happens; maybe an 
OutOfMemoryException.  In that case I'd expect that the constructor is 
never called.
>
>> and immediately before object destruction.
>
--------------
Charles Yeomans



More information about the Valentina mailing list