1. A method for managing memory, comprising: determining which, if any, objects included in a set of objects associated with a first thread included in a plurality of threads associated with a heap are no longer reachable; garbage collecting any objects of the set that are not determined to be reachable; keeping track of which objects stored in the heap are included in the set of objects associated with the first thread; and removing an object from the set of objects associated with the first thread if the object becomes associated with a thread other than the first thread.