follow CA1001: Types that own disposable fields should be disposable

https://msdn.microsoft.com/library/ms182172.aspx
This commit is contained in:
icylogic
2016-01-19 02:04:49 +08:00
parent ce67551d31
commit 586caab7c4
2 changed files with 15 additions and 2 deletions
@@ -12,7 +12,8 @@ using Shadowsocks.Model;
namespace Shadowsocks.Controller.Strategy
{
using Statistics = Dictionary<string, List<StatisticsRecord>>;
class StatisticsStrategy : IStrategy
internal class StatisticsStrategy : IStrategy, IDisposable
{
private readonly ShadowsocksController _controller;
private Server _currentServer;
@@ -152,5 +153,10 @@ namespace Shadowsocks.Controller.Strategy
{
//TODO: combine this part of data with ICMP statics
}
public void Dispose()
{
_timer.Dispose();
}
}
}