I couldn't reproduce the memory leak, but I've implemented two fixes:
- Fixed an issue when drawing onto compressed images, which was causing the error: ERROR: Condition "p_dest->get_format() != p_src->get_format()" is true.
- Optimized resource usage during drawing.
Patch released.