1. A method for object tracking of resource objects with acquire and release semantics, the method comprising: instrumenting in an agent executing in a virtual machine in memory by a processor of a computer, both an acquisition method and a release method of a resource object to write a reference to the resource object to an open object set upon acquiring the resource object from a time when the acquisition method is called, and to remove the reference to the resource object in the open object set upon releasing the resource object; determining whether the resource object both has been flagged for garbage collection in the virtual machine and also remains referenced in the open object set; and, generating an error record in the virtual machine responsive to determining the resource object to have been both flagged for garbage collection in the virtual machine and also remaining referenced in the open object set.