Andrea: thank you very much for sending the results as running Valgrind is time-consuming and requires a lot of patience!
The impressive results as shown below is out of over 6 GB used only 600,000+ bytes - that is only 1/100 of 1% (a little over half a MB for over 6 GB!) lost on a quitting Cinelerra-gg.
HEAP SUMMARY:
in use at exit: 694,680 bytes in 6,052 blocks
total heap usage: 1,063,358 allocs, 1,057,306 frees, 6,180,470,729 bytes allocated
GG has glanced at it already and will take a closer look as there are some "Conditional jumps" that he may be able to get rid of. Also, some memory leaks in ffmpeg that he has to look into:
==1322== 40 (32 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 88 of 404
...
==1322== by 0x7134A0: init (af_aformat.c:101)
==1322== by 0x18757DF: avfilter_init_str (avfilter.c:1018)