example/tailing.rb in winevt_c-0.4.7.rc2 vs example/tailing.rb in winevt_c-0.5.0
- old
+ new
@@ -11,9 +11,10 @@
string_inserts = @subscribe.string_inserts
message = message.gsub(/(%\d+)/, '\1$s')
message = sprintf(message, *string_inserts)
puts ({eventlog: eventlog, data: message})
+ @subscribe.close_handle # Dispose EVT_HANDLE variable which is allocated in EvtNext
else
printf(".")
sleep(1)
end
end