Skip to content

[Refactor] Small refactoring to AddKeepAlives method - #8423

Merged
jonathanpeppers merged 1 commit into
dotnet:mainfrom
Youssef1313:patch-5
Oct 17, 2023
Merged

[Refactor] Small refactoring to AddKeepAlives method#8423
jonathanpeppers merged 1 commit into
dotnet:mainfrom
Youssef1313:patch-5

Conversation

@Youssef1313

@Youssef1313Youssef1313 commented Oct 13, 2023

Copy link
Copy Markdown
Member
  • The method.Parameters.Count == 0 check should be faster than LINQ's Any call (CustomAttributes.Any). So moved it first.
  • Moved some variables near their usage, particularly, GetILProcessor which may allocate unnecessarily if GC.KeepAlive(...) call was already found. It's not a big of problem though as it's not very common.

@jonathanpeppers

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppersjonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a ApplicationRunsWithDebuggerAndBreaks test failure, but that one is flaky and we can ignore.

@jonathanpeppers
jonathanpeppers merged commit 2625783 into dotnet:mainOct 17, 2023
@Youssef1313
Youssef1313 deleted the patch-5 branch October 17, 2023 16:34
grendello added a commit to grendello/xamarin-android that referenced this pull request Oct 18, 2023
* main:
[Mono.Android] Generate API docs with "full" verbosity (dotnet#8435)
[profiled-aot] update profile for .NET 8 GA (dotnet#8428)
Bump to xamarin/Java.Interop/main@3c83179 (dotnet#8429)
[Xamarin.Android.Build.Tasks] Small refactoring to `AddKeepAlives` method (dotnet#8423)
[Xamarin.Android.Build.Tasks] Fixup indirect resource references (dotnet#8416)
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jan 22, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Youssef1313@jonathanpeppers