[cairo] Win32 Surface Mem increase and app crash

曹志鹏 caozp at qq.com
Sun May 5 00:56:43 PDT 2013


I solved it.
Add cairo_surface_flush(surface) in the end.

在 2013-5-4,下午21:39,小帅猪 <caozp at qq.com> 写道:

> In MFC app, I add code in OnDraw();
> 
> {
>     cario_surface_t* surface = cairo_win32_surface_create(pDC->GetSafeHDC());
>     cairo_t* cr = cairo_create(surface);
>     //Draw something;
>     cairo_surface_destroy(surface);
>     cairo_destroy(cr);
> }
> 
> It works, but when redrawing like maxize window, the memory increase, in the end, the application crash.
> Is there any problem? Help me.
> -- 
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list