1. A method for using versioned pointers to facilitate reuse of memory, comprising: receiving a request to allocate an object; obtaining the object from a pool of free objects, wherein each object in the pool of free objects is indicated by a corresponding pointer, and wherein the object includes a version number for a current allocation of the object; setting an allocated/free flag in the object to indicate that the object is allocated and encoding the version number for the current allocation of the object into the pointer to the object; returning the pointer to the object; and using the pointer to the object to perform one or more subsequent accesses to the object, wherein performing the accesses comprises comparing the version number encoded in the pointer with the version number in the object to determine whether the object has been referenced erroneously.