On 11/15/2015 06:25 PM, Dimitry Sibiryakov wrote: > 15.11.2015 14:22, Alex Peshkoff wrote: >> Use of permanent >> interface is not an option here - configuration for module may change >> during server lifetime, and creating new and new permanent instances >> means memory leak. > Here you imply that plugin must see configuration files in state they > were at the > moment of its initialization
In some cases - yes, in others - not. An example - engine works with permanent copy of firebird.conf taken when it was started, but aliases.conf (or databases.conf) are reloaded when changed. > >> If plugin >> module needs config info, it adds it's reference to the module and >> releases it when config is not needed. > Here you imply that plugin stores reference to the config object to use > it later. > > Both these assumptions comes from a little wrong plugins architecture. > > Yes, plugin must have access to its config at initialization time. At > this point it > should have a full information about environment, so it can get needed > parameters and > store it inside in a suitable form. From this on, configuration object is not > needed > anymore and can be easily destroyed by caller. If you call a way to store parameters (one by one or as a whole interface) to be a "plugin architecture" I'm very sorry... > If user changed configuration files, plugin may be interested in it, or > not, but > currently there is no way to inform it. Actually, whole server has no ass to > be kicked to > reload configuration files. > Yes? Are you sure? aliases.conf was simply re-read for each opened database since it's arrival in fb1.5 ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
