* BSQUARE Corp. and I remain the copyright of the code and article.
[Memory Leak in GraphicContext]
The function in GraphicContextCairoWin.cpp below will allocate a memory block to cairo_t*
static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha)
We have to release memory when platform destory in GraphicContextCairo.cpp
void GraphicsContext::platformDestroy()
{
RefPtr<cairo_t> cr = platformContext()->cr();
cr.~RefPtr();
delete m_data;
}
沒有留言:
張貼留言