fix: Dispose last stream sub before evaluting next expression in DSQA

If the expression throws, we don't want the old stream to keep ticking.
This commit is contained in:
John Colvin committed 2025-11-19 14:44:55 -05:00
1 parent f86795d18d
commit 23c20bb255
1 file changed
+1 -3
@@ -200,6 +200,7 @@ namespace BCG {
private void myTryExpression(string expStr)
{
Disposable.dispose(ref currStreamSub);
_stopwatch.Restart();
myFreezeView(false); // force unfreeze the view
var oldExp = myExp;
@@ -214,9 +215,6 @@ namespace BCG {
myTabControl.SelectedIndex = 0;
myErrorTextBox.Text = "";
// myDataGrid.CaptionText = "";
Disposable.dispose(ref currStreamSub);
myExp = exp;
myCrono.Restart();