BKE_id_delete
This high-level function can only deal with IDs in main, trying to use it to delete/free a no-main ID does nothing.