Skip to content

Commit 6a9eb03

Browse files
authored
Merge main into feature/XRI3 (#1098)
2 parents 4f5b465 + c105fef commit 6a9eb03

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

.github/workflows/pr_labeler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
label-pr:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/github-script@v6
14+
- uses: actions/github-script@v8
1515
with:
1616
script: |
1717
if (context.payload.pull_request.base.ref == 'feature/XRI3')

.github/workflows/validation_mrtk3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v6
1616

1717
- name: Get Pull Request changes
1818
if: github.event_name == 'pull_request'

org.mixedrealitytoolkit.input/InteractionModes/InteractionModeManager.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,17 @@ private void Awake()
319319
InitializeInteractionModeDetectors();
320320
}
321321

322+
/// <summary>
323+
/// A Unity event function that is called when the script component has been destroyed.
324+
/// </summary>
325+
private void OnDestroy()
326+
{
327+
if (InteractionManager != null)
328+
{
329+
InteractionManager.interactorRegistered -= OnInteractorRegistered;
330+
}
331+
}
332+
322333
/// <summary>
323334
/// A Unity Editor only event function that is called when the script is loaded or a value changes in the Unity Inspector.
324335
/// </summary>

org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsCalculator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ internal static Bounds CalculateBounds(
100100
finalBounds.Encapsulate(root.InverseTransformPoint(totalBoundsCorners[i]));
101101
}
102102

103+
totalBoundsCorners.Clear();
104+
childTransforms.Clear(); // Avoid keeping reference to Unity objects to avoid "Leaked Memory Shell"
103105
return finalBounds;
104106
}
105107

org.mixedrealitytoolkit.uxcore/Interop/UGUIInputAdapter.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ protected override void OnDisable()
164164
}
165165
}
166166

167+
/// <summary>
168+
/// A Unity event function that is called when the script component has been destroyed.
169+
/// </summary>
170+
protected override void OnDestroy()
171+
{
172+
base.OnDestroy();
173+
if (InteractionManager != null)
174+
{
175+
InteractionManager.interactorRegistered -= OnInteractorRegistered;
176+
InteractionManager.interactorUnregistered -= OnInteractorUnregistered;
177+
}
178+
}
179+
167180
/// <summary>
168181
/// Called when a an <see cref="IXRInteractor"/> is registered with a Unity <see cref="XRInteractionManager"/>.
169182
/// </summary>

0 commit comments

Comments
 (0)