memory safety changes