Patent ID: 7076511

Claim:
A method of releasing the memory associated with a set of objects that have a hierarchical tree relationship, the method comprising the computer-implemented steps of: creating the set of objects that have the hierarchical tree relationship; allocating memory for each object, wherein memory associated with an object at the top of the hierarchical tree relationship is a heap and memory associated with the rest of the objects in the hierarchical tree relationship are subheaps of the heap, and the step of allocating further comprises allocating the heap for the object at the top and allocating the subheaps of the heap for the rest of the objects in the hierarchical tree relationship; maintaining data that defines a relationship between the memory for each object; wherein the data reflects the organization of the hierarchical tree relationship; receiving a request to release memory associated with an object; and in response to receiving the request, accessing the data to determine what memory is associated with one or more objects that are descendants of the object, releasing the memory associated with the object and the memory associated with the descendants of the object; and wherein the data comprises child and sibling pointer pairs and the step of maintaining the data that defines the relationship further comprises: maintaining the child and sibling pointer pairs that define the relationship between the memory for each object.