Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Cleaning up a dynamic temp-table

> When you’re done using a dynamic temp-table, you should delete it just as you should any other object. Use the `DELETE OBJECT` `tt-handle` statement to do this. The default buffer is deleted along with the temp-table. You cannot use the `DELETE OBJECT` statement on the temp-table’s `DEFAULT-BUFFER-HANDLE`, but you must use it on any additional dynamic buffers created for the temp-table.

> When you pass a dynamic temp-table as a parameter, and you then delete the dynamic temp-table, Progress executes the deletion differently depending on whether the temp-table parameter is passed with `OUTPUT`, `INPUT-OUTPUT`, or `INPUT` mode:

> - OUTPUT or INPUT-OUTPUT mode — The `DELETE OBJECT` statement for the temp-table is intercepted and marked as pending during the called procedure. The temp-table is deleted just after the called procedure returns, once the parameter hand-off is complete.

> - INPUT mode — The `DELETE OBJECT` statement for the temp-table executes immediately (when it is encountered) as there is no need to preserve the temp-table for any parameter hand-off.

> Note: To avoid memory leaks, you should always use the `DELETE OBJECT` statement to delete the dynamic temp-table created by an `OUTPUT` `TABLE-HANDLE` parameter.

> For more information about passing dynamic temp-tables as parameters, see the "Using a temp-table as a parameter" section.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095