I have a lot of functions in Packages and object types returning TOracleObject/TOracleRefeence/TLOBLocator instances. Also when navigating through object structures (RefAttr, ObjectAttr, LOBAttr) a lot of instances are created.
I know that these instances are registered with TOracleSession and should be freed when the session component is freed. But I want to free these components in another/shorter scope.
Working with BCB, I decided to take auto_ptr to handle this.
When the root object is freed by the auto pointer I see the following picture in OracleMonitor:
xOracleReferenceXX
PinnedObject
LINES
ObjElement
So obviously I deleted OracleReferenceXX. What about the instances of the sub objects? Are they freed by their root object?
What is best practise when working with objects/bcb?
I know that these instances are registered with TOracleSession and should be freed when the session component is freed. But I want to free these components in another/shorter scope.
Working with BCB, I decided to take auto_ptr to handle this.
When the root object is freed by the auto pointer I see the following picture in OracleMonitor:
xOracleReferenceXX
PinnedObject
LINES
ObjElement
So obviously I deleted OracleReferenceXX. What about the instances of the sub objects? Are they freed by their root object?
What is best practise when working with objects/bcb?