Monkey patch GD2::AnimatedGif to fix the finalizer

https://github.com/dark-panda/gd2-ffij/pull/27
This commit is contained in:
Tom Hughes 2024-08-14 18:19:24 +01:00
parent 735a5cf9e2
commit 390d49d3f0

View file

@ -0,0 +1,15 @@
module OpenStreetMap
module GD2
module AnimatedGif
def frames_finalizer
proc do
@frames.each do |frame|
::GD2::GD2FFI.send(:gdFree, frame.ptr)
end
end
end
end
end
end
GD2::AnimatedGif.prepend(OpenStreetMap::GD2::AnimatedGif)