Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double unregistration on dispose of Array. #81230

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Array(IEnumerable<Variant> collection) : this()
/// </summary>
/// <param name="array">The objects to put in the new array.</param>
/// <returns>A new Godot Array.</returns>
public Array(Variant[] array) : this()
public Array(Variant[] array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand All @@ -68,7 +68,7 @@ public Array(Variant[] array) : this()
this[i] = array[i];
}

public Array(Span<StringName> array) : this()
public Array(Span<StringName> array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand All @@ -84,7 +84,7 @@ public Array(Span<StringName> array) : this()
this[i] = array[i];
}

public Array(Span<NodePath> array) : this()
public Array(Span<NodePath> array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand All @@ -100,7 +100,7 @@ public Array(Span<NodePath> array) : this()
this[i] = array[i];
}

public Array(Span<Rid> array) : this()
public Array(Span<Rid> array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand All @@ -121,7 +121,7 @@ public Array(Span<Rid> array) : this()
// fine as long as the array is not mutated. However, Span does this type checking at
// instantiation, so it's not possible to use it even when not mutating anything.
// ReSharper disable once RedundantNameQualifier
public Array(ReadOnlySpan<GodotObject> array) : this()
public Array(ReadOnlySpan<GodotObject> array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand Down Expand Up @@ -1057,7 +1057,7 @@ public Array(IEnumerable<T> collection)
/// </summary>
/// <param name="array">The items to put in the new array.</param>
/// <returns>A new Godot Array.</returns>
public Array(T[] array) : this()
public Array(T[] array)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
Expand Down