determine the memory used by a datawindow or datastore
it is often necessary to know how much memory a datawindow or datastore is using to prevent an "out of memory" error or to facilitate debugging. when the memory usage is known, processing of data or the retrieval of data can be stopped when a maximum limit is reached.
to determine the amount of virtual memory used by a datawindow or datastore, the storage attribute is used. it can be invoked from either of the two methods below:
both cases return a string value in bytes of storage used.
note - dw_control can refer to either a datawindow or datastore
an example usage would be:
canceling a query that uses too much storage. you can check this property in the script for the retrieverow event in the datawindow control and cancel a query if it is consuming too much storage. note - this example will inject performance degradation by increasing the retrieve time.