Blender leaks memory when the compositor gets canceled. That's because later operations in the compositor are responsible for freeing the results of earlier operations, so when the compositor gets canceled before all operations got the chance to execute, memory will be leaked. To fix this, force free all operations when the compositor gets canceled.