Monkey patch GD2::AnimatedGif to fix the finalizer
https://github.com/dark-panda/gd2-ffij/pull/27
This commit is contained in:
parent
735a5cf9e2
commit
390d49d3f0
1 changed files with 15 additions and 0 deletions
15
config/initializers/gd2.rb
Normal file
15
config/initializers/gd2.rb
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue