diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-08 14:39:39 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-08 14:39:39 -0500 |
| commit | f856e166ff1a4d95dc7f8f0656751557c2cd7949 (patch) | |
| tree | 213ed02cd535a2923f0fce632644d750129afc18 /MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs | |
| parent | 803de20bb99e48b55fdf4483042c466bdf844d7a (diff) | |
Add WanAddress to SystemInfo
Diffstat (limited to 'MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs index 075ef4239..5842b05a3 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteChapterRepository.cs @@ -32,6 +32,8 @@ namespace MediaBrowser.Server.Implementations.Persistence _logger = logManager.GetLogger(GetType().Name); } + private SqliteShrinkMemoryTimer _shrinkMemoryTimer; + /// <summary> /// Opens the connection to the database /// </summary> @@ -52,6 +54,8 @@ namespace MediaBrowser.Server.Implementations.Persistence _connection.RunQueries(queries, _logger); PrepareStatements(); + + _shrinkMemoryTimer = new SqliteShrinkMemoryTimer(_connection, _writeLock, _logger); } /// <summary> @@ -282,6 +286,12 @@ namespace MediaBrowser.Server.Implementations.Persistence { lock (_disposeLock) { + if (_shrinkMemoryTimer != null) + { + _shrinkMemoryTimer.Dispose(); + _shrinkMemoryTimer = null; + } + if (_connection != null) { if (_connection.IsOpen()) |
