update docs for vips_shutdown() use

Since we have a new policy.
This commit is contained in:
John Cupitt 2021-09-17 19:09:07 +01:00
parent af61d375bc
commit b96ed28903
3 changed files with 15 additions and 5 deletions

View File

@ -8,6 +8,7 @@
memory and file descriptors
- add vips_image_get_format_max()
- flatten handles out of range alpha and max_alpha correctly
- don't use atexit for cleanup, it's too unreliable
16/8/21 started 8.11.4
- fix off-by-one error in new rank fast path

View File

@ -29,8 +29,13 @@
<para>
When your program starts, use VIPS_INIT()
to start up the VIPS library. You should pass it the name
of your program, usually <code>argv[0]</code>. Use
vips_shutdown() when you exit. VIPS_INIT() is a macro to let it check
of your program, usually <code>argv[0]</code>. If you call
vips_shutdown() just before you exit, libvips will attempt to free all
resources. This can help leak checking, but is not required.
</para>
<para>
VIPS_INIT() is a macro to let it check
that the libvips library you have linked to matches the libvips headers
you included.
</para>

View File

@ -30,6 +30,10 @@
* - hide warnings is VIPS_WARNING is set
* 20/4/19
* - set the min stack, if we can
* 17/9/21
* - don't use atexit for cleanup, it's too unreliable ... users should
* call vips_shutdown explicitly if they want a clean exit, though a
* dirty exit is fine
*/
/*
@ -726,6 +730,9 @@ vips_thread_shutdown( void )
* Call this to drop caches and close plugins. Run with "--vips-leak" to do
* a leak check too.
*
* vips_shutdown() is optional. If you don't call it, your platform will
* clean up for you.
*
* 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.
@ -754,11 +761,8 @@ vips_shutdown( void )
}
vips__render_shutdown();
vips_thread_shutdown();
vips__thread_profile_stop();
vips__threadpool_shutdown();
#ifdef HAVE_GSF