我正在进行有此测试的项目,并且它会泄漏内存。有人可以向我解释原因吗?我们怀疑cinch代码是否泄漏,但我们不确定。
require 'rubygems'
require 'bundler/setup'
require 'time'
require 'cinch'
require 'cinch/user_list'
CURATORS = [
'a',
'b',
'c',
"one",
"two",
"three"
]
bot = Cinch::Bot.new do
configure do |c|
c.nick = "Redw0od"
c.password = "oauth:fgbz5f1qiqvriyp0tz6dqpb3ukverl"
c.realname = "Redwood"
c.server = "irc.twitch.tv"
c.channels = CURATORS.map { |c| '#' + c }
# c.channels = ["#eulcs2"]
end
on :connect do |m, *args|
m.bot.irc.send("CAP REQ :twitch.tv/commands")
m.bot.irc.send("CAP REQ :twitch.tv/tags")
m.bot.irc.send("CAP REQ :twitch.tv/membership")
end
on :catchall do |m|
synchronize(:logmutex) do
end
end
end
bot.loggers.level = :error
bot.start