Skip to content

Commit

Permalink
fix: standalone executable does not shut down
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Feb 6, 2021
1 parent 4a65687 commit 85c77aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/MediaPipe/Examples/Scripts/DemoGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ public abstract class DemoGraph : MonoBehaviour, IDemoGraph<TextureFrame> {

protected virtual void OnDestroy() {
Stop();
graph = null;
gpuHelper = null;

if (graph != null) {
graph.Dispose();
graph = null;
}
if (gpuHelper != null) {
gpuHelper.Dispose();
gpuHelper = null;
}
if (stopwatch != null && stopwatch.IsRunning) {
stopwatch.Stop();
}
Expand Down

0 comments on commit 85c77aa

Please sign in to comment.