KAA-217: Fix memory leaks in destructors used for list elements.