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

Internalize MessagingCenter #12582

Merged
merged 9 commits into from
Jan 23, 2023
Merged

Internalize MessagingCenter #12582

merged 9 commits into from
Jan 23, 2023

Conversation

jfversluis
Copy link
Member

Description of Change

MessagingCenter was deprecated for net7, let's make it internal for net8 so we are free to remove/replace it whenever we want after that.

@mattleibow mattleibow merged commit f9be2d1 into main Jan 23, 2023
@mattleibow mattleibow deleted the internalize-messagingcenter branch January 23, 2023 18:49
@jonathanpeppers
Copy link
Member

It appears there is a memory leak every time you do:

await DisplayAlert("Done!", "Done!", "Ok");

image

#pragma warning disable CS0618 // TODO: Remove when we internalize/replace MessagingCenter
if (IsPlatformEnabled)
MessagingCenter.Send(this, AlertSignalName, args);
else
_pendingActions.Add(() => MessagingCenter.Send(this, AlertSignalName, args));
#pragma warning restore CS0618 // Type or member is obsolete

Is this a known issue with MessagingCenter?

@mattleibow
Copy link
Member

That may have been one of the reasons we want to remove it. But probably we just want to reduce unnecessary complexity.

I got this one that needs my tests fixed #12910

mattleibow added a commit that referenced this pull request Aug 16, 2023
This reverts commit f9be2d1.

# Conflicts:
#	src/Controls/src/Core/MessagingCenter.cs
#	src/Controls/src/Core/Properties/AssemblyInfo.cs
#	src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
mattleibow added a commit that referenced this pull request Aug 17, 2023
This reverts commit f9be2d1.

# Conflicts:
#	src/Controls/src/Core/MessagingCenter.cs
#	src/Controls/src/Core/Properties/AssemblyInfo.cs
#	src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
rmarinho pushed a commit that referenced this pull request Aug 19, 2023
This reverts commit f9be2d1.

# Conflicts:
#	src/Controls/src/Core/MessagingCenter.cs
#	src/Controls/src/Core/Properties/AssemblyInfo.cs
#	src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants