Sha256: 4e3b05fd75967e9f559825317ab93ec72ced222e9771713e740679274e49b516

Contents?: true

Size: 564 Bytes

Versions: 13

Compression:

Stored size: 564 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 or 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

13 entries across 13 versions & 2 rubygems

Version Path
vips-8.11.3 example/example2.rb
vips-8.10.5 example/example2.rb
vips-8.9.1 example/example2.rb
ruby-vips-2.0.17 example/example2.rb
vips-8.8.4 example/example2.rb
vips-8.8.3 example/example2.rb
ruby-vips-2.0.16 example/example2.rb
vips-8.8.2 example/example2.rb
ruby-vips-2.0.15 example/example2.rb
ruby-vips-2.0.14 example/example2.rb
vips-8.8.0.3 example/example2.rb
vips-8.8.0.2 example/example2.rb
vips-8.8.0.1 example/example2.rb