Tracking Delphi objects for resource tracking

0 Likes

Problem:

How can I track Delphi object for resource tracking?

Resolution:

By default we do not track all Delphi objects for resource tracking.  We track most of the core objects.  You can easily add tracking for almost any Delphi Object by putting it in routine.dat.  For instance, say BoundsChecker does not track creation or destruction of TmyCoolObj.  To get Boundschecker to track it all you need to do is put the following lines in routine.dat:

TmyCoolObj.Create      ID 031

TmyCoolObj.Destroy    ID 032

TmyCoolObj.Free         ID 032

This is assuming that the object has a create, destroy and free method. The one catch is that the creation method must return the handle to the object in EAX processor register (the register in which return values are most frequently stored).  This is the case for anything we have run into so far.

Old KB# 12173
Comment List
Anonymous
Related Discussions
Recommended