Em 07/05/2016 13:13, Dimitry Sibiryakov escreveu:
> 07.05.2016 18:03, Adriano dos Santos Fernandes wrote:
>> Optimizations are not allowed to broke conforming code.
> 
>    Compiler is free to destroy old instance of object and create a new one 
> when its 
> content is overwritten by assignment operator using appropriate copy or move 
> constructor.
>    For the code snippet above following sequence of events is conforming:
> 
> a.XXX(anyPool)
> a.~XXX()
> a.XXX(YYY)
> 
>    But it will blow when default pool, used in the last constructor, die.
>    Of course, such code can work ok for years just because pools are living 
> longer than 
> any object allocated in it. But still it is a time bomb.
> 

No, just no! It will not do this!

You're free to write minimal test case compiling with maximum
optimization to demonstrate this.

You will fail, I know.


Adriano

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to