Patent ID: 7065747

Claim:
A method of tracking references that are likely to be the only references to a plurality of objects stored in an object-oriented programming environment, said method comprising: determining whether a command is likely to place a reference to an object on an execution stack which is used to execute computer program code in said object-oriented programming environment; determining whether there is a change in the flow control between the time command is likely to place said reference to said object on said execution stack and the time said reference is used to access said object when said determining determines that said command is likely to place said reference to said object on said execution stack; translating said command into another command that indicates that it is likely that said reference is the only reference to said object when said determining determines that said command is likely to place said reference to said object on said execution stack and said determining determines that there is a change in the flow control between the time said command is likely to place the reference to said object on said execution stack and the time said reference is used to access said object, thereby effectively indicating that said another command is likely to place the only reference to said object on said execution stack; executing said another command; and placing said reference to said object on a reference stack associated with said execution stack when said another command is executed, wherein said reference stack is not used to execute computer program code and is designated to store only references that are likely to be the only references to various objects stored in a heap, thereby storing a reference that is likely to be the only reference to a particular object on said reference stack.