RECHECKED WITH VALGRIND. AS SAFE AS I CAN MAKE IT. AND THE ANSWERS ARE ACCURATE AS FAR AS I CAN TELL.