lib/grok/match.rb in jls-grok-0.4.3 vs lib/grok/match.rb in jls-grok-0.4.4
- old
+ new
@@ -19,9 +19,15 @@
layout :grok, :pointer,
:subject, :string,
:start, :int,
:end, :int
+ # Placeholder for the FFI::MemoryPointer that we pass to
+ # grok_execn() during Grok#match; this should prevent ruby from
+ # garbage collecting us until the GrokMatch goes out of scope.
+ # http://code.google.com/p/logstash/issues/detail?id=47
+ attr_accessor :subject_memorypointer
+
public
def initialize
super
@captures = nil