From ef2094a04bbfca606438a9ca098f37094b727c34 Mon Sep 17 00:00:00 2001 From: Salman Chishti Date: Sat, 13 Dec 2025 17:09:53 +0000 Subject: [PATCH 1/2] chore: Upgrade GitHub Actions to latest versions (#1094) chore: upgrade GitHub Actions to latest versions --- .github/workflows/pr_labeler.yaml | 2 +- .github/workflows/validation_mrtk3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_labeler.yaml b/.github/workflows/pr_labeler.yaml index 4dbb0ea6a..9a3c67832 100644 --- a/.github/workflows/pr_labeler.yaml +++ b/.github/workflows/pr_labeler.yaml @@ -11,7 +11,7 @@ jobs: label-pr: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v8 with: script: | if (context.payload.pull_request.base.ref == 'feature/XRI3') diff --git a/.github/workflows/validation_mrtk3.yaml b/.github/workflows/validation_mrtk3.yaml index dc88c0a65..2f7e1f9c3 100644 --- a/.github/workflows/validation_mrtk3.yaml +++ b/.github/workflows/validation_mrtk3.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Get Pull Request changes if: github.event_name == 'pull_request' From c105fef1e7ce4bc0340db1334f4550763d7ab8d5 Mon Sep 17 00:00:00 2001 From: anonymous2585 <148471165+anonymous2585@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:37:06 +0100 Subject: [PATCH 2/2] Fix some leaked managed shell (#1095) (#1096) Co-authored-by: Anonymous --- .../InteractionModes/InteractionModeManager.cs | 11 +++++++++++ .../BoundsControl/BoundsCalculator.cs | 2 ++ .../Interop/UGUIInputAdapter.cs | 13 +++++++++++++ 3 files changed, 26 insertions(+) diff --git a/org.mixedrealitytoolkit.input/InteractionModes/InteractionModeManager.cs b/org.mixedrealitytoolkit.input/InteractionModes/InteractionModeManager.cs index b80b0723d..13381d3db 100644 --- a/org.mixedrealitytoolkit.input/InteractionModes/InteractionModeManager.cs +++ b/org.mixedrealitytoolkit.input/InteractionModes/InteractionModeManager.cs @@ -298,6 +298,17 @@ private void Awake() InitializeInteractionModeDetectors(); } + /// + /// A Unity event function that is called when the script component has been destroyed. + /// + private void OnDestroy() + { + if (InteractionManager != null) + { + InteractionManager.interactorRegistered -= OnInteractorRegistered; + } + } + /// /// A Unity Editor only event function that is called when the script is loaded or a value changes in the Unity Inspector. /// diff --git a/org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsCalculator.cs b/org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsCalculator.cs index f23d1eed2..10e1b700a 100644 --- a/org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsCalculator.cs +++ b/org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsCalculator.cs @@ -100,6 +100,8 @@ internal static Bounds CalculateBounds( finalBounds.Encapsulate(root.InverseTransformPoint(totalBoundsCorners[i])); } + totalBoundsCorners.Clear(); + childTransforms.Clear(); // Avoid keeping reference to Unity objects to avoid "Leaked Memory Shell" return finalBounds; } diff --git a/org.mixedrealitytoolkit.uxcore/Interop/UGUIInputAdapter.cs b/org.mixedrealitytoolkit.uxcore/Interop/UGUIInputAdapter.cs index c6a87369c..ecd6517c7 100644 --- a/org.mixedrealitytoolkit.uxcore/Interop/UGUIInputAdapter.cs +++ b/org.mixedrealitytoolkit.uxcore/Interop/UGUIInputAdapter.cs @@ -162,6 +162,19 @@ protected override void OnDisable() } } + /// + /// A Unity event function that is called when the script component has been destroyed. + /// + protected override void OnDestroy() + { + base.OnDestroy(); + if (InteractionManager != null) + { + InteractionManager.interactorRegistered -= OnInteractorRegistered; + InteractionManager.interactorUnregistered -= OnInteractorUnregistered; + } + } + /// /// Called when a an is registered with a Unity . ///