<div dir="ltr">Move cairo_destroy() before cairo_surface_destroy().</div><div class="gmail_extra"><br clear="all"><div>Best regards<br>Petr Kobalicek<br></div>
<br><br><div class="gmail_quote">On Sun, May 5, 2013 at 10:56 AM, 曹志鹏 <span dir="ltr"><<a href="mailto:caozp@qq.com" target="_blank">caozp@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I solved it.<br>
Add cairo_surface_flush(surface) in the end.<br>
<br>
在 2013-5-4,下午21:39,小帅猪 <<a href="mailto:caozp@qq.com">caozp@qq.com</a>> 写道:<br>
<div class="HOEnZb"><div class="h5"><br>
> In MFC app, I add code in OnDraw();<br>
><br>
> {<br>
> cario_surface_t* surface = cairo_win32_surface_create(pDC->GetSafeHDC());<br>
> cairo_t* cr = cairo_create(surface);<br>
> //Draw something;<br>
> cairo_surface_destroy(surface);<br>
> cairo_destroy(cr);<br>
> }<br>
><br>
> It works, but when redrawing like maxize window, the memory increase, in the end, the application crash.<br>
> Is there any problem? Help me.<br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
> cairo mailing list<br>
> <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
> <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
<br>
--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a></font></span></blockquote></div><br></div>