From: Dimitry S. <sd...@ib...> - 2013-10-31 19:40:54
|
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?.. -- WBR, SD. |