From 862e1ae214cad4aa1c38fd2a7d79e42cbfb421f2 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 3 Feb 2020 17:01:57 +0000 Subject: [PATCH] add VIPS_LEAK env var --- ChangeLog | 3 +++ libvips/iofuncs/init.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65715ee0..7c2e8aa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ - libtiff LOGLUV images load and save as libvips XYZ - add gifload_source - revise vipsthumbnail flags +- add VIPS_LEAK env var +- add vips_pipe_read_limit_set(), --vips-pipe-read-limit, + VIPS_PIPE_READ_LIMIT 31/1/19 started 8.9.2 - fix a deadlock with --vips-leak [DarthSim] diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index fc4ab5ae..966d95f8 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -435,6 +435,8 @@ vips_init( const char *argv0 ) vips_info_set( TRUE ); if( g_getenv( "VIPS_PROFILE" ) ) vips_profile_set( TRUE ); + if( g_getenv( "VIPS_LEAK" ) ) + vips_leak_set( TRUE ); if( g_getenv( "VIPS_TRACE" ) ) vips_cache_set_trace( TRUE ); if( g_getenv( "VIPS_PIPE_READ_LIMIT" ) ) @@ -1197,8 +1199,8 @@ vips_version( int flag ) * vips_leak_set: * @leak: turn leak checking on or off * - * Turn on or off vips leak checking. See also --vips-leak and - * vips_add_option_entries(). + * Turn on or off vips leak checking. See also --vips-leak, + * vips_add_option_entries() and the `VIPS_LEAK` environment variable. * * You should call this very early in your program. */