[Botan-devel] Initializing Botan lazily
Jack Lloyd
lloyd at randombit.net
Mon Oct 8 12:05:00 EDT 2007
On Mon, Oct 08, 2007 at 08:29:04AM +0300, Boris wrote:
> you could add another static function to set initializer options:
>
> static void LibraryInitializer::initializer_options(const
> InitializerOptions&);
>
> However I'm not sure what the advantage is then of not calling
> LibraryInitializer::initialize() directly. :)
Ordinarily it wouldn't be, but _if_ you wanted to speculatively
deallocate Botan's internal state you would have to have a way of
setting any options that should be used. Then you can periodically
deallocate all the state, and if/when Botan was used again, the
library would silently reinitialize itself with the right options.
I was hoping I or someone else could think of something other than
just a static function, but I may just do that (at least for 1.7.2,
and if I find a better solution later then maybe I'll change the
code).
-Jack
More information about the botan-devel
mailing list