jingwood / d2dlib

A .NET library for hardware-accelerated, high performance, immediate mode rendering via Direct2D.
MIT License
234 stars 40 forks source link

LinearGradientBrush cause memory leak #37

Closed gilsonwang closed 3 years ago

gilsonwang commented 3 years ago

I found that the memory always get more and more when creating a new component by using LinearGradientBrush for background painting, even the component already disposed. I try to figure out what cause this problem.

There is probably a reason that. While using CreateLinearGradientBrush() function in Brush.cpp., it calls CreateGradientStopCollection before CreateLinearGradientBrush but (what ?) did not release it.