Skip to content

Commit

Permalink
Added disposal on exit in the Unity example
Browse files Browse the repository at this point in the history
  • Loading branch information
mentalvertex committed Oct 14, 2020
1 parent fe2c049 commit d249017
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bindings/cs/UnityViewer/Assets/SurviveObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,12 @@ void Update() {
updatedObject.transform.localRotation = newRotation;
}
}

void OnApplicationQuit() {
if (survive != null){
survive.Close();
survive.Dispose();
survive = null;
}
}
}

0 comments on commit d249017

Please sign in to comment.