Another memory leak in 1.14
As discovered by @He_Junyan, another memory was introduced by backporting 7663fa26 to 1.14. The surface is never freed which leads to large leaks.
See also the MR discussion here: !155 (comment 360239)
This is a follow-up of #188 (closed).