Implemented destructors

Checked with DrMemory, all good.