<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def track(cls, obj, ptr):
 """ Track an object which needs destruction when it is garbage collected. """

        cls._objects.add(cls(obj, ptr))