Use checked delete in scoped_ptr

deleting incomplete type causes undefined behavior.