File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -370,20 +370,23 @@ end
370
370
-- writers
371
371
372
372
function Image_method :write_to_file (vips_filename , ...)
373
+ collectgarbage (" stop" )
373
374
local filename = to_string_copy (vips_lib .vips_filename_get_filename (vips_filename ))
374
375
local options = to_string_copy (vips_lib .vips_filename_get_options (vips_filename ))
375
376
local name = vips_lib .vips_foreign_find_save (filename )
377
+ collectgarbage (" restart" )
376
378
if name == ffi .NULL then
377
379
error (verror .get ())
378
380
end
379
-
380
381
return voperation .call (ffi .string (name ), options ,
381
382
self , filename , unpack { ... })
382
383
end
383
384
384
385
function Image_method :write_to_buffer (format_string , ...)
386
+ collectgarbage (" stop" )
385
387
local options = to_string_copy (vips_lib .vips_filename_get_options (format_string ))
386
388
local name = vips_lib .vips_foreign_find_save_buffer (format_string )
389
+ collectgarbage (" restart" )
387
390
if name == ffi .NULL then
388
391
error (verror .get ())
389
392
end
You can’t perform that action at this time.
0 commit comments