I would recommend explicitly 0-initializing the key_list array. Even if it happens automatically, that isn't something you want to take chances with.

Calling delete will definitely *not* automatically NULL-out the pointer passed to it. It simply renders the address held by the pointer invalid, nothing more.