Patent ID: 8060543

Claim:
A system to carry out a method of tracking resource use, comprising: a general-purpose digital computer programmed to determine a time measurement of when the resource is allocated; determine a time measurement of when the resource is first used; determine a time measurement of when the resource is last used; determine a time measurement of when the resource is deallocated; determine a metric using at least one of the time measurements; classify the resource according to the metric, wherein the metric includes retention duration corresponding to a difference between the time measurement of when the resource is deallocated and the time measurement of when the resource is last used, wherein the classifying includes determining whether the resource is a retained resource, and wherein the resource is determined as the retained resource when, after the resource is last used the resource is not deal located after a threshold time; and analyze memory usage information of a computer program that uses the resource in connection with the classifying of the resource, wherein analyzing the memory usage information includes identifying memory leaks in the computer program according to the classifying of the resource as the retained resource and indicating code corrections of the computer program related to the retained resource; wherein the resource is a software object; wherein deallocating the resource includes at least one of: setting a flag for the resource and adding an identifier for the resource to a list of resources to be deallocated; and wherein the time measurements correspond to at least one of: a count of garbage collection cycles and a number of method calls since the beginning of program execution.