boost::checked_deleter will do.

Change-Id: I952d9dfcffd85aaae49fc1f1eba9ba070900f672