On 08/06/14 11:26, Dimitry Sibiryakov wrote: >> I also think the version checks must be automatic at least in the C++ >> API, but calling getVersion in each call is not good. > It is not good but unavoidable in current plugin architecture. The first > thing that > every method of every interface have to do is to check versions of every > interface it got > as parameters and upgrade them if necessary. Otherwise new plugins will crash > with old > engines/applications when use new methods.
To be precise - that must be done when method is unsure about passed interface and is really going to use new methods. > Upgrading causes allocation of new VMT which (AFAICS) is never released. You are wrong here. See releaseUpgradeTabs(IPluginModule*) function. > Upgrading doesn't replace getVersion() address in new VMT which means > that even > upgraded interface will return old version and will be upgraded again and > again on the > next call. > It will be replaced. It's very easy to do it. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel