@vportnov will not it cause double free in case of exception on 'delete' statement below?