Releases memA, memB and memC[i] objects.