1. A method of identifying a memory leak in a data structure, the method comprising: accessing a listing of a computer program, the computer program including program elements that create the data structure and operate on the data structure to include one or more objects as components of the data structure; identifying at least one object-adding program element that adds at least one object to the data structure and at least one object-removing program element that removes at least one object from the data structure; injecting data-structure bookkeeping code into the at least one object-adding program element and the at least one object-removing program element, the data-structure bookkeeping code operating to track a change in a size of the data structure with a reference to a corresponding location in an execution path of the computer program; executing the computer program with the injected data-structure bookkeeping code to determine a first cumulative change in the size of the data structure at a first location in the execution path of the computer program by summing tracked changes at the first location; and using the first cumulative change to identify the first location as a source of the memory leak in the data structure, the memory leak corresponding to an increasing allocation of memory beyond a threshold value for leaking memory.