CSDN博客

img wang1st

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

发表于2002/2/16 23:31:00  492人阅读

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.

 

 
0 0

相关博文

我的热门文章

img
取 消
img