Fix implementation of IDisposable interfaces

This commit is contained in:
Drake Arconis
2017-03-23 20:49:34 -04:00
parent e12e89fa13
commit eed52751d5
3 changed files with 13 additions and 4 deletions

View File

@@ -551,14 +551,14 @@ namespace OpenMetaverse
GC.SuppressFinalize(this);
}
public virtual void Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
{
if (!disposing) return;
AckTimer?.Dispose();
PingTimer?.Dispose();
StatsTimer?.Dispose();
ConnectedEvent?.Close();
ConnectedEvent?.Dispose();
// Force all the CAPS connections closed for this simulator
Caps?.Disconnect(true);

View File

@@ -288,7 +288,16 @@ namespace OpenMetaverse.Voice
/// </summary>
public void Dispose()
{
Stop();
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
Stop();
}
}
internal string GetVoiceDaemonPath()

View File

@@ -62,7 +62,7 @@ namespace OpenMetaverse
"simstate", // 22
string.Empty, // 23
"link", // 24
"link_f", // 25
"link_f", // 25
string.Empty, // 26
string.Empty, // 27
string.Empty, // 28