-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
This issue has been moved from a ticket on Developer Community.
Version: .NET 4.5 (may be later)
I repeatedly enter and delete characters in a WPF TextBox.
It leaks a little memory.
I checked with CLRProfiler45.
The leaking object is InputScopeAttribute.
I close the window, but the InputScopeAttribute object count does not decrease.
I found the cause on referencesource.
TextStore is not decrementing the reference count of InputScopeAttribute.
2700 attrval.val.data1.Value = Marshal.GetIUnknownForObject(obj);
2784 _preparedattributes.Add(attrval);
The TextStore gets the reference count of the InputScopeAttribute with Marshal.GetIUnknownForObject.
785 _preparedattributes.Clear();
2666 _preparedattributes.Clear();
But it’s not releasing the reference count with Marshal.Release.
Original Comments
Feedback Bot on 5/17/2023, 02:09 PM:
(private comment, text removed)
Feedback Bot on 9/5/2023, 10:54 AM:
(private comment, text removed)
Original Solutions
(no solutions)