[Miles' Blog]

Welcome 2 My Planet

Available categories: [/] [working on downwap.] [trouble shooting] [working on Yup Mailman]

关于vbs字符串内存资源的释放 [Permalink]

Wed Oct 27 10:28:01 CST 2004
Category [development. ~]

今天有人问了一个很有意思的问题,就是vbs字符串所占的内存如何释放。我做了下面这个test.vbs:

Dim temp, WshShell
set WshShell = WScript.CreateObject("WScript.Shell")

temp = space(1024*1024*20) '20MB

WScript.Sleep 2000

'temp = ""

msgbox("done")

这里打开和关闭temp=""时候可以发现,系统内存使用状况完全不一样(通过任务管理器就可以看到)。结论也就很容易得出了。。。

Posted by: miles
Comments [0] |

?
四月 2024
Sun? Mon? Tue? Wed? Thu? Fri? Sat?
 123456
78910111213
14151617181920
21222324252627
282930    
       
<  Mar???Today??? May  >
<< <   1   > >>

Available categories: [/] [working on downwap.] [trouble shooting] [working on Yup Mailman]

Powered By blojsom?? RSS Feed? RSS2 Feed? RDF Feed

html hits:?51343