From 6af489407d8f0361208a8d705ca9dec47aeeb72f Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 17 Sep 2015 12:36:32 -0700 Subject: [PATCH] Added disposable to GCodeRenderer and GCodeVertexBuffer Made them get called to release memory. --- PartPreviewWindow/ViewGcodeWidget.cs | 5 +++++ Submodules/agg-sharp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PartPreviewWindow/ViewGcodeWidget.cs b/PartPreviewWindow/ViewGcodeWidget.cs index a6a8a3861..f6b5ccf9e 100644 --- a/PartPreviewWindow/ViewGcodeWidget.cs +++ b/PartPreviewWindow/ViewGcodeWidget.cs @@ -508,6 +508,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public override void OnClosed(EventArgs e) { + if (gCodeRenderer != null) + { + gCodeRenderer.Dispose(); + } + if (backgroundWorker != null) { backgroundWorker.CancelAsync(); diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 968ab38ab..e777fc325 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 968ab38ab62bb3ff58e99c404ee6a817f3c46907 +Subproject commit e777fc325ba5e1c11e232bcea7801c007746f82b