public function detach()
{
parent::detach();
remove_action('admin_init', array($this, '_attach'));
remove_action('save_post', array($this, '_save'));
// unregister field names
foreach ($this->fields as $field) {
$this->drop_unique_field_name($field->get_name());
}
}