docs note about restarting vips

add note that you can't stop and restart vips

see https://github.com/jcupitt/libvips/issues/450
This commit is contained in:
John Cupitt 2016-05-23 13:30:23 +01:00
parent dbbd2850a1
commit bcc93d2dbb
1 changed files with 12 additions and 1 deletions

View File

@ -136,6 +136,10 @@ vips_get_argv0( void )
* VIPS_INIT() is a macro, since it tries to check binary compatibility * VIPS_INIT() is a macro, since it tries to check binary compatibility
* between the caller and the library. * between the caller and the library.
* *
* You may call VIPS_INIT() many times and vips_shutdown() many times, but you
* must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot
* stop and restart vips.
*
* VIPS_INIT() does approximately the following: * VIPS_INIT() does approximately the following:
* *
* + checks that the libvips your program is expecting is * + checks that the libvips your program is expecting is
@ -152,6 +156,9 @@ vips_get_argv0( void )
* + loads any plugins from $libdir/vips-x.y/, where x and y are the * + loads any plugins from $libdir/vips-x.y/, where x and y are the
* major and minor version numbers for this VIPS. * major and minor version numbers for this VIPS.
* *
* + if your platform supports atexit(), VIPS_INIT() will ask for
* vips_shutdown() to be called on program exit
*
* Example: * Example:
* *
* |[ * |[
@ -494,7 +501,11 @@ vips_thread_shutdown( void )
* vips_shutdown: * vips_shutdown:
* *
* Call this to drop caches and close plugins. Run with "--vips-leak" to do * Call this to drop caches and close plugins. Run with "--vips-leak" to do
* a leak check too. May be called many times. * a leak check too.
*
* You may call VIPS_INIT() many times and vips_shutdown() many times, but you
* must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot
* stop and restart vips.
*/ */
void void
vips_shutdown( void ) vips_shutdown( void )