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

Avoid unnecessary allocations on DependencyObjectExtensions.RegisterDisposableNestedPropertyChangedCallback #705

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

pictos
Copy link
Contributor

@pictos pictos commented Aug 9, 2023

Overview

On the RegisterDisposableNestedPropertyChangedCallback we allocate an array and a SerialDisposable even when they aren't used. Moving the allocation inside the if will make sure we just allocate then if needed.

Not sure if will be a case where that if will be false, if don't feel free to close this PR.

PR Type

What kind of change does this PR introduce?

  • Improvements

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@pictos pictos requested a review from kazo0 August 9, 2023 11:40
@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-705.eastus2.azurestaticapps.net

@agneszitte agneszitte merged commit 90c5144 into main Aug 10, 2023
16 checks passed
@agneszitte agneszitte deleted the pj/avoid-allocation branch August 10, 2023 13:14
@agneszitte
Copy link
Contributor

@Mergifyio backport legacy/3x

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2023

backport legacy/3x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 10, 2023
…isposableNestedPropertyChangedCallback (#705)

(cherry picked from commit 90c5144)
agneszitte pushed a commit that referenced this pull request Aug 11, 2023
…isposableNestedPropertyChangedCallback (backport #705) (#711)

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants