Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Windows] Fix GDI resource leaks in the software fallback path#34574

Merged
loic-sharma merged 1 commit into
flutter-team-archive:mainfrom
sevenstars:fix_dc_leak
Jul 15, 2022
Merged

[Windows] Fix GDI resource leaks in the software fallback path#34574
loic-sharma merged 1 commit into
flutter-team-archive:mainfrom
sevenstars:fix_dc_leak

Conversation

@sevenstars

Copy link
Copy Markdown
Contributor

In FlutterWindowWin32::OnBitmapSurfaceUpdated(), the ReleaseDC function is not called to release the DC.
The ReleaseDC function must be called to release the DC.

This PR will fix issue: flutter/flutter#107368

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@loic-sharma

Copy link
Copy Markdown
Contributor

LGTM. I tested before/after this change using this repro flutter/flutter#107368 (comment).

@gw280 do you have concerns with this?

@loic-sharma loic-sharma merged commit c29bf8f into flutter-team-archive:main Jul 15, 2022
@loic-sharma

Copy link
Copy Markdown
Contributor

Thanks for the contribution! 🎉

betrevisan pushed a commit to betrevisan/engine that referenced this pull request Jul 15, 2022
…er-team-archive#34574)

Updates `FlutterWindowWin32::OnBitmapSurfaceUpdated` to release the device context using `ReleaseDC`.

Fixes: flutter/flutter#107368
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Jul 16, 2022
…allback path (flutter-team-archive/engine#34574) (#107754)

Commit: 5c33db6ccd46f29512e5a06c73aa6caf18779c23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants