-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

sub sk79 wrote:
> 1. Is it possible to register a callback which is invoked on database
close?

There is a hacky way of finding out when a particular db is closed.
Register a collation with an unused name (eg "_____AX1") and provide an
xDestroy callback.  That callback will fire when the db closes.

> 2. or is there a plan to add something like: sqlite3_extension_end() which
> can be used for this?

You can register a function callable from SQL that directs your code to
discard any information/cache it has calculated.

> 3.  and if answer to 2 is yes, how about add an 'unload' command for
> extensions as well so that we can unload extensions when they are no more
> needed?

The only time SQLite is truly quiescent is when sqlite3_shutdown has
been called.  If you are calling that then you can clean up your own
stuff too.

If you are in an embedded environment then you have total control over
what is going on.  In a normal environment, allocated memory that isn't
being used will end up swapped out.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqbOGAACgkQmOOfHg372QQugwCcDNXji1lqV7LlVsr90Ggr6ToH
GPcAnizoUXPc2B9OuL8bNhY7m/TgEvfg
=wXMn
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to