diff --git a/config/initializers/gd2.rb b/config/initializers/gd2.rb new file mode 100644 index 0000000000..0005bd8be9 --- /dev/null +++ b/config/initializers/gd2.rb @@ -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)