Fixed a memory leak in the Windows uiArea.
This commit is contained in:
parent
56d0d35f83
commit
1d4e341583
|
@ -56,6 +56,8 @@ static HRESULT doPaint(uiArea *a, ID2D1RenderTarget *rt, RECT *client, RECT *cli
|
|||
|
||||
(*(ah->Draw))(ah, a, &dp);
|
||||
|
||||
freeContext(dp.Context);
|
||||
|
||||
return ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,6 +262,11 @@ uiDrawContext *newContext(ID2D1RenderTarget *rt)
|
|||
return c;
|
||||
}
|
||||
|
||||
void freeContext(uiDrawContext *c)
|
||||
{
|
||||
uiFree(c);
|
||||
}
|
||||
|
||||
static ID2D1Brush *makeSolidBrush(uiDrawBrush *b, ID2D1RenderTarget *rt, D2D1_BRUSH_PROPERTIES *props)
|
||||
{
|
||||
D2D1_COLOR_F color;
|
||||
|
|
Loading…
Reference in New Issue