On 10/31/13 23:39, Dimitry Sibiryakov wrote: > Hello, All. > >> virtual void FB_CARG dispose() >> { >> delete static_cast<This*>(this); >> } > Isn't such trick dangerous? > > I see in manual that "You can explicitly convert a pointer to a class X > to a pointer to > some class Y if X is a base class for Y. A static conversion can be made only > under the > following conditions: > - if an unambiguous conversion exists from Y to X > - if X is not a virtual base class" > > But IDisposable is "a virtual base class", isn't it?..
For a particular layout of our interfaces this is not dangerous. ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel