dotnet / dotnet/wpf

TextBoxView causes memory leak for 2 seconds after unloading host control

Open
#1,160 4 comments 1 reaction 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: All versions
* Windows version: 1909
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

**Problem description:**
TextBoxView causes memory leak for 2 seconds after unloading host control.
That's caused by the `DispatcherTimer` `_throttleBackgroundTimer`.
This might not be a problem during usage by a human user, but when i use my custom UI test framework this is a real problem.

**Actual behavior:**
TextBoxView causes memory leak for 2 seconds after unloading host control.

**Expected behavior:**
TextBoxView does not leak memory after unloading host control

**Minimal repro:**
- Create a window containing a `TextBox`
- Create a new instance of the window open/show the window, focus the `TextBox` and close that window multiple times during a 2 second timespan in a loop

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.