Fix a memory leak in CanvasImageDecoder
CanvasImageDecoder is instantiated with a callback into a Dart closure. That closure was holding references to the ImageDecoder and the returned Image. The circular reference between the ImageDecoder and the callback prevented the objects from being GCed, resulting in leakage of the image buffer. CanvasImageDecoder will now destroy the callback after it is invoked, thus releasing its handle to the Dart closure.
Showing
想要评论请 注册 或 登录