diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index 279ca47..f70d0a4 100644 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -139,6 +139,10 @@ Context2d::Context2d(Canvas *canvas) { */ Context2d::~Context2d() { + // Olaf (2011-02-21): free the state table + for (int i = 0 ; i < CANVAS_MAX_STATES; ++i) { + if (states[i]) free(states[i]); + } cairo_destroy(_context); }