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

今天有人问了一个很有意思的问题,就是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 on this entry





Author (*):
Verify Code (*):8 9 7 9
E-mail:
URL:
Comment (*):
Remember me?

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

Powered By blojsom   RSS Feed  RSS2 Feed  RDF Feed