US 7,398,531 B2
Providing common memory management code to objects that are instances of different classes
Mohammad Shoaib Lari, Palo Alto, Calif. (US); Ravikanth Kasamsetty, Union City, Calif. (US); and Srinath Krishnaswamy, Fremont, Calif. (US)
Assigned to Oracle International Corporation, Redwood Shores, Calif. (US)
Filed on Jul. 30, 2002, as Appl. No. 10/209,469.
Claims priority of provisional application 60/378872, filed on May 07, 2002.
Claims priority of provisional application 60/384647, filed on May 31, 2002.
Prior Publication US 2005/0177836 A1, Aug. 11, 2005
Int. Cl. G06F 3/00 (2006.01); G06F 9/44 (2006.01); G06F 9/46 (2006.01); G06F 13/00 (2006.01)
U.S. Cl. 719—320  [717/108; 717/116] 28 Claims
OG exemplary drawing
 
1. A method of creating subclasses having memory management executables generated from common memory management code, comprising the computer-implemented steps of:
generating a first specialized template by passing, as a parameter to a memory management template that includes common memory management interfaces and implementations, a first abstract class of first objects created or accessed for accessing a database, whereby the first specialized template includes memory management executables specialized to the first abstract class and derived from the common memory management interfaces and implementations;
wherein said first objects include at least one from a first hierarchically related group of (a) a database connection object, (b) a database query statement object, (c) a database query result set object, and wherein each of said first objects is associated with a corresponding piece of memory;
generating a second specialized template by passing, as a parameter to the memory management template, a second abstract class of second objects created or accessed for accessing a database, whereby the second specialized template includes memory management executables specialized to the second abstract class and derived from the common memory management interfaces and implementations;
wherein said second objects include at least one object, from said first hierarchically related group, that is different from said at least one object from said first objects, and wherein each of said second objects is associated with a corresponding piece of memory;
subclassing a first specialized template subclass from the first specialized template, wherein the first specialized template subclass provides an implementation for an interface of the first abstract class;
subclassing a second specialized template subclass from the second specialized template, wherein the second specialized template subclass provides an implementation for an interface of the second abstract class; and
in response to a particular object of said first or second objects being destroyed, traversing data that represents said hierarchy of said first hierarchically related group to release said pieces of memory associated with said particular object and any objects that are under said particular object in said hierarchy.