Fixed memory leak in my imagecanvas widget