APP_Media_Manager::maybe_clear_old_attachments( $object_id, $attachments = array(), $delete = false, $meta_object = null )
Unassigns or deletes any previous attachments that are not present on the current attachment enqueue list.
Unassigns or deletes any previous attachments that are not present on the current attachment enqueue list.