A method includes traversing pointers reachable from a root node, identifying an object, determining whether the identified object has a weak property, determining, when the identified object has a weak property, whether the key object referenced by the identified weak property is traversed by the garbage collector, if the key object associated with the identified weak property is traversed by the garbage collector, queuing the value object for later traversal, otherwise, marking the key object as being watched and appending an entry in a table mapping the key objects to a list with value object pointer locations as an entry and determining whether the identified object is visited for the first time by the garbage collector.