判断一个数据窗口占用的内存量

王朝other·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

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:

Dot Notation

dw_control.Object.DataWindow.Storage

Describe

dw_control.Describe("DataWindow.Storage")

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.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航