Add gnc_engine_shutdown call.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3291 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-12-12 10:51:53 +00:00
parent 10158c250a
commit 53434e166c
3 changed files with 15 additions and 0 deletions

View File

@ -60,6 +60,17 @@ gnc_engine_init(int argc, char ** argv) {
}
}
/********************************************************************
* gnc_engine_shutdown
* shutdown backend, destroy any global data, etc.
********************************************************************/
void
gnc_engine_shutdown (void)
{
g_cache_destroy (gnc_string_cache);
gnc_string_cache = NULL;
}
/********************************************************************
* gnc_engine_add_init_hook

View File

@ -34,6 +34,9 @@ typedef void (* gnc_engine_init_hook_t)(int, char **);
* be used. */
void gnc_engine_init(int argc, char ** argv);
/* called to shutdown the engine */
void gnc_engine_shutdown (void);
/* pass a function pointer to gnc_engine_add_init_hook and
* it will be called during the evaluation of gnc_engine_init */
void gnc_engine_add_init_hook(gnc_engine_init_hook_t hook);

View File

@ -93,6 +93,7 @@
(else
(gnc:ui-destroy)
(gnc:hook-run-danglers gnc:*shutdown-hook*)
(gnc:engine-shutdown)
(exit exit-status))))
(define (gnc:ui-finish)