On 22-02-2015 14:51, Dimitry Sibiryakov wrote:
> 22.02.2015 18:35, Adriano dos Santos Fernandes wrote:
>> So you have:
>>
>> IBlob* blob = ...->openBlob(...);
>> blob->cancel();
>> // no leak
> 
>    Using of smart pointers here makes life even funnier. IMHO, it is Y-valve 
> bug.
>    But in absence of API specifications it is rather "as expected".
> 

A solution must be to pass a parameter to destroy methods specifying if
they should release or not the object.

And of course, all implementations should follow it.

So with or without smart pointers, use may be more intuitive.


Adriano

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to