Need to unregister from printer so we don't hold in memory and call multiple times

This commit is contained in:
Lars Brubaker 2019-03-20 18:20:46 -07:00
parent 3fdbd86603
commit 715d051d79
2 changed files with 4 additions and 1 deletions

View file

@ -108,6 +108,7 @@ namespace MatterHackers.MatterControl
private void RestoreBedAndClearPrinterCallbacks()
{
printer.Connection.Disposed -= Connection_Disposed;
printer.Connection.CommunicationStateChanged -= Connection_CommunicationStateChanged;
}
private void Connection_CommunicationStateChanged(object sender, EventArgs e)