On 17/05/2011 08:27, Vlad Khorsun wrote: >> 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. > Your words are very incongruent. "Release" releases, and shall be valid for any objects.
You broke the IAttachment from external engines, with are only release-able. They should not be dropped or detached. Making the release an error is like create private destructors. You could do it, but difficultly you may justify it. >> 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 ??? > > ... Why are we adding addRef/release after all? To support wrong code and solve nothing. With the cost of all this mess, all this otherwise unneeded discussion, all the global/local pool mess. Adriano ------------------------------------------------------------------------------ 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