Browse Source

Properly dispose of pango related allocations in ~Context2d()

v1.x
c-spencer 13 years ago
parent
commit
3388ab5b33
  1. 10
      src/CanvasRenderingContext2d.cc

10
src/CanvasRenderingContext2d.cc

@ -178,7 +178,15 @@ Context2d::Context2d(Canvas *canvas) {
*/
Context2d::~Context2d() {
while(stateno >= 0) free(states[stateno--]);
while(stateno >= 0) {
#if HAVE_PANGO
free(states[stateno]->fontFamily);
#endif
free(states[stateno--]);
}
#if HAVE_PANGO
g_object_unref(_layout);
#endif
cairo_destroy(_context);
}

Loading…
Cancel
Save