Rudolf Adamkovič writes: > [...], and indeed, and the code above resulted in 1098 allocations of > 4.72 MB, totaling ~5.18 GB, and they are all like these: [...] Okay, I could not let go before sleep and investigated further. See the attached patch. With it, the never-freed 5.18 GB of RAM is fixed for: (dotimes (x 1000) (let ((frame (make-frame-command))) (sleep-for 0.01) (delete-frame frame))) P.S. The remaining 5.22 - 5.13 ~= 100 MB is wasted due to bugs elsewhere. Rudy