Sha256: f5aaba1a4f998400189ff4027c437a0f4c158395871072e257a9b0ad36af1d8b

Contents?: true

Size: 561 Bytes

Versions: 12

Compression:

Stored size: 561 Bytes

Contents

#!/usr/bin/ruby

require "logger"
require "vips"

puts ""
puts "starting up:"

# this makes vips keep a list of all active objects which we can print out
Vips.leak_set true

# disable the operation cache
Vips.cache_set_max 0

# GLib::logger.level = Logger::DEBUG

n = 10000

n.times do |i|
  puts ""
  puts "call #{i} ..."
  out = Vips::Operation.call "black", [200, 300]
  if out.width != 200 || out.height != 300
    puts "bad image result from black"
  end
end

puts ""
puts "after #{n} calls:"
GC.start
Vips::Object.print_all

puts ""
puts "shutting down:"

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/ruby-vips-2.2.1/example/example2.rb
ruby-vips-2.2.2 example/example2.rb
ruby-vips-2.2.1 example/example2.rb
vips-8.15.1 example/example2.rb
ruby-vips-2.2.0 example/example2.rb
vips-8.12.2 example/example2.rb
vips-8.12.1 example/example2.rb
ruby-vips-2.1.4 example/example2.rb
ruby-vips-2.1.3 example/example2.rb
ruby-vips-2.1.2 example/example2.rb
ruby-vips-2.1.1 example/example2.rb
ruby-vips-2.1.0 example/example2.rb