replaced manualy new/delete by AutoBuffer