Skip to content

simplify temp file generation (port 6.0)#5754

Merged
RussKie merged 1 commit intodotnet:release/6.0from
weltkante:issue5717-v6
Sep 13, 2021
Merged

simplify temp file generation (port 6.0)#5754
RussKie merged 1 commit intodotnet:release/6.0from
weltkante:issue5717-v6

Conversation

@weltkante
Copy link
Contributor

@weltkante weltkante commented Sep 13, 2021

Fixes #5717

Port from #5744

Proposed changes

  • remove custom temp file name generation. It was using a newly allocated image handle to seed a random number generator, which is both unnecessary overhead and was leaking the image handle.

Customer Impact

  • no more image handle leaks when assigning background images to list view

Regression?

  • No

Risk

  • probably none, unless someone relied on the temp file name patterns

Before

  • leaking ~3 GDI handles every time the background images was assigned

After

  • no image handle leak

Test methodology

  • manual testing and observing GDI object count in task manager
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow

@weltkante weltkante requested a review from a team as a code owner September 13, 2021 21:15
@ghost ghost assigned weltkante Sep 13, 2021
@RussKie RussKie added this to the 6.0 rc2 milestone Sep 13, 2021
@RussKie RussKie merged commit 49646b8 into dotnet:release/6.0 Sep 13, 2021
@RussKie RussKie linked an issue Sep 13, 2021 that may be closed by this pull request
@weltkante weltkante deleted the issue5717-v6 branch September 14, 2021 07:28
@ghost ghost locked as resolved and limited conversation to collaborators Jan 26, 2022
Sign up for free to 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.

NET5.0.9 ListView BackgroundImage GDI object leak

3 participants