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
370370-- writers
371371
372372function Image_method :write_to_file (vips_filename , ...)
373+ collectgarbage (" stop" )
373374 local filename = to_string_copy (vips_lib .vips_filename_get_filename (vips_filename ))
374375 local options = to_string_copy (vips_lib .vips_filename_get_options (vips_filename ))
375376 local name = vips_lib .vips_foreign_find_save (filename )
377+ collectgarbage (" restart" )
376378 if name == ffi .NULL then
377379 error (verror .get ())
378380 end
379-
380381 return voperation .call (ffi .string (name ), options ,
381382 self , filename , unpack { ... })
382383end
383384
384385function Image_method :write_to_buffer (format_string , ...)
386+ collectgarbage (" stop" )
385387 local options = to_string_copy (vips_lib .vips_filename_get_options (format_string ))
386388 local name = vips_lib .vips_foreign_find_save_buffer (format_string )
389+ collectgarbage (" restart" )
387390 if name == ffi .NULL then
388391 error (verror .get ())
389392 end
You can’t perform that action at this time.
0 commit comments