Should I Clean Up My Collections? [message #665007] |
Thu, 17 August 2017 10:19 |
|
whdyck
Messages: 25 Registered: May 2017
|
Junior Member |
|
|
I'm using an associative array in a compound trigger.
Q: Do I need to somehow clean up the array at the end of the trigger or does the DBMS do that for me when it goes out of scope?
Thanks.
Wayne
|
|
|
|
|
Re: Should I Clean Up My Collections? [message #665010 is a reply to message #665007] |
Thu, 17 August 2017 11:31 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
You need to understand object scope. Trigger, procedure, function are instantiated each time they are called. Package global variables are instantiated once per session (unless package is created with PRAGMA SERIALLY_REUSABLE). Anyway, data in collection created in compound trigger will persist through the duration of the statement, so depending on particular trigger logic you might need to delete from collection if collection data shouldn't be spanning across row level actions.
SY.
[Updated on: Thu, 17 August 2017 11:32] Report message to a moderator
|
|
|
|
|
|
|
|