Please sign in to comment.
DO NOT MERGE Fix memory leak
Cherry pick Bug: 6952980 GraphicsContext::createOffscreenContext creates an instance of both PlatformGraphicsSkia and GraphicsContext for ImageBuffer. However, ImageBuffer will only call delete on the GraphicsContext. In normal GC usage, the PlatformGraphicsContext's lifecycle is longer than the GCs, and is cleaned up by itself. This will result in leaking the PlatformGraphicsSkia context, though. We need to make sure to call delete on the PlatformGraphicsSkia context if we were initialized with the deleteUs() flag, which is used to indicate just this scenario. Change-Id: If908dcb44e99568b92ee63d6337ce9f84adc9adf
- Loading branch information...
Showing with 6 additions and 0 deletions.