GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Three — Data Types and Operators (continued)
ReleaseWorkingPoolSpace Function
Overview
The ReleaseWorkingPoolSpace function trims the internal working string pool size.
Syntax/Parameters
Syntax
int = ReleaseWorkingPoolSpace ( );
Parameters
(none)
Return Value
Returns an int as ERROR_NONE.
Remarks
Each script engine will employ an internal working string pool that is used to store data being passed to various functions internally. GetWorkingPoolSize is a tool to help understand how much memory is being used to transition data.
The pool can grow rather large if progressively larger strings are manipulated. For example, adjusting and accumulating strings in the range of hundreds of megabytes in size. ReleaseWorkingPoolSpace will cap the pool memory at the current working location and release the remaining memory.
Transitional data is information used to perform string math and functions. For example, if FileToString is run, the result is placed on the working string pool and then stored in memory. The remaining space in the working pool is reused but not released.
When releasing memory, it is best to do it at the lowest level in the stack as possible. For example, large strings are passed to functions down the stack and ReleaseWorkingPoolSpace is called at that depth, it will be less effective.
The principal use of ReleaseWorkingPoolSpace is to allow the engine to give up large allocations of memory that are no longer needed. For example, a continuously running script performs a periodic task involving very large strings or arrays, this function can be used to return some space to the local heap and to the system.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.