On 02/23/15 13:47, Adriano dos Santos Fernandes wrote:
> On 23/02/2015 07:36, Vlad Khorsun wrote:
>> 22.02.2015 20:11, Adriano dos Santos Fernandes wrote:
>>
>>> A solution must be to pass a parameter to destroy methods specifying if
>>> they should release or not the object.
>>     Must be ? I don't think so. I'm not ready to point to correct solution
>> right now, but additional parameter is not a solution, as for me.
>> I prefer to know more opinions...
>>
> Could be, whatever...
>
> It's just weird too that with normal pointers one would need to destroy
> and release.
>
> It was clear for me since the start that usage of reference count there,
> specially for objects with destroy methods were going to be problematic,
> but you all didn't want to see.
>
> We're trying to mix different OO approaches.
>
> For example, MS ADO who uses COM and ref. counting has a different way
> to deal with objects.
>
> Some (most, all?) objects start dead, and you need to open them, then
> you can close them, reopen them, etc.
>
> It's just completely different approach than what we have, mixing things
> (non resurrect objects with ref. counting).
>

I agree that we should not have different calling semantics for yvalve 
and providers. I agree that using both destroy and release with normal 
pointers is weird. At the same time I agree that using destroy-like 
methods that decrement reference counter with smart pointers is (on my 
mind) even more weird. What about resurrect-able objects - I dislike 
them first of all cause we get one more type of error: object is closed 
with a need to check for it here and there.

So suggested parameter may be a solution but I think it's a bit overhead 
- it makes it possible to treat some pointers as smart but others as 
normal. I think we should not support mix of object types in single 
client. Instead we can set a kind of "objects flavor" in IProvider call, 
i.e. notify provider _once_ should destroy-like methods decrement 
reference counter or not.



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to