A method for tracking a target object, involving identifying at least one
portion of code corresponding to a constructor for the target object, and
inserting a first tracking method before the at least one portion of code
and inserting a second tracking method after the at least one portion of
code to obtain executable code, wherein the first tracking method and the
second tracking method comprise a calling object reference and a target
object reference as arguments.