Check that pointers are removed from maps before calling delete on the pointers,
for tidiness' sake.