> What about the following - we always pass status vector to release().

    I'm sorry but i against it. addRef\release is and well known pair and its
usage also well known. I see no good reason to change it. More, if we
need to change it, then we use it in a wrong way.

> It's not a problem technically - IStatus is not refCounted. We use it in

    Call detach() is also not a problem technically, why don't use it when 
necessary ? Why we want to replace detach by release ???

> the following way - if refCounter > 1, no error happened (later it
> always means that nothing like system call failed took place). If
> refCounter == 1 and object has no special dtor, again no error happened.

    If object have no explicit destructor then release must be called, no 
problem.

> But if we release something like transaction and due to it rollback some
> job - transaction is released (what can we do?), but error (or may be
> better warning? not sure...) is reported - job was implicitly rolled back.

    You can kill me, but i don't understand - why do we want to call release,
if good special explicit destructor is present ???

...
>>     Difference between "destoy" and "release" is semantics. I don't know how
>> to explain it else.
>>
> 
> _I_ understand you. 

    Good.

> But not sure it's OK for documentation POV. 

    Speaking about documentation i'd said we must document usage of every 
public 
interface and specify explicitly how instance is constructed and destroyed.

> Notice - if we add status vector to release, the problem is almost gone. 

    No, please.

> We may just say: people, always check error status please.

    And add - use detach when needed and release in other cases :)

Regards,
Vlad

PS You make me remember MS way to report errors in their DAC's. They have 
global 
Errors collection and it must be checked after every call of any object. Or 
remember
GetLastError. Do you want something similar ? We can remove IStatus parameter 
from every method and add

    IStatus* IMaster::getStatus()

to the master interface. Not sure i like it...



------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to