On 31-03-2011 07:49, Alex Peshkoff wrote:

>> People would like to detach a parent and not care about statements
>> created but unfreed for this attachment.
>>
> 
> If they do not call addRef for statements, they will be destroyed when
> attachment goes away
> 
This is against of what you already said, and in fact destroys the
concept of recounting.

If I call attachment->allocateStatement, this statement is owned by me
now, even if I don't call addRef on it.

If someone else calls release on it, they must have called addRef
before. Then, you have leaks if one releases the attachment and leave
the statement.

So again, two different bad things for two different choices.

>> And for who is using C++ and RAII, they don't need addRef/release in our
>> objects to use that.
> 
> Absolutely wrong.
> 
"Wrong" because you want to support bad practices, of use a object after
it's freed.

>> Well, if you want to say that someone is correct just because chose the
>> COM way, then we would need to say we're incorrect because we don't use
>> queryInterface...
> 
> In many aspects use of queryInterface might be ideal. Two main reasons
> why we can't use it:
> - it will cause additional delays in time-critical places like fetching
> next record,
> - it will pollute each place in the code where we work with plugins.
> 
> On the other hand I see no problems with adding that method to our
> interfaces, specially if it's needed to make Delphi people life easier.
> It does not conflict with our versioning support.
> 
This is looking like a Frankenstein...


Adriano

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to