重温一位老朋友:设置oRS = Nothing [英] Revisiting an old friend: Set oRS = Nothing

查看:116
本文介绍了重温一位老朋友:设置oRS = Nothing的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

去年9月,我们中的一些人参与讨论了用JScript编写的用于
ASP脚本的资源。可以在这里看到:
http://tinyurl.com/2flzt


我最近阅读了Eric Lippert关于在VB中使用* Nothing *赋值

的文章( http://blogs.msdn.com/ericlippert/ar...28/122259.aspx

就在走出范围之前,他对所说的内容感到震惊,并且

我必须说它让我好奇它对于ASP,无论是用JScript还是VBScript写的



和Lippert一样,我看过很多文档/建议,表明需要

用于此类转让,但很少有经验证据证明这一点很重要。我这样做是否意味着* b $ b并不意味着建议*没有任何*任务是绝对不需要的,我只是想知道是否有人打扰检查它是否仍然是最近的重要

几代IIS和ADO或CDO等常用工具。


评论?


-

戴夫安德森


未经请求的商业电子邮件将以每封邮件500美元的价格阅读。使用

此电子邮件地址即表示同意这些条款。请不要直接联系

我或要求我直接与您联系以获取帮助。如果您的问题值得询问,那么值得发帖。

Last September, some of us engaged in a discussion of freeing resources in
ASP scripts written in JScript. It can be seen here:
http://tinyurl.com/2flzt

I recently read Eric Lippert''s article on the use of *Nothing* assignments
in VB (http://blogs.msdn.com/ericlippert/ar...28/122259.aspx)
right before going out of scope, and was shocked by what he had to say, and
I must say it has me curious about the implications for ASP, whether written
in JScript or VBScript.

Like Lippert, I have seen a lot of documentation/advice that suggests a need
for such assignments, but little empirical evidence that it matters. I do
not mean to suggest that *Nothing* assignments are NEVER required, I simply
wonder if anyone has bothered to check if it still matters with recent
generations of IIS and such common tools as ADO or CDO.

Comments?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it''s worth posting.

推荐答案

每条消息500条。使用

此电子邮件地址即表示同意这些条款。请不要直接联系

我或要求我直接与您联系以获取帮助。如果你的问题值得询问,那就值得发帖了。
500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it''s worth posting.


这种探索背后的动机是保存能力吗? ; 20

击键?


虽然垃圾收集应该是一件好事,但我仍然习惯使用

我总是使用它obj.close:set obj = nothing。为什么要留下任何东西?
机会?我曾经看过添加set obj =没有突然消除的情况

未指定Access的错误问题,等等。


甚至需要更长的时间想想这个问题,而不是只需要继续遵循我一直以来的最佳实践,而且我的编码是

始终保持一致......如果没有其他的话我要检查是否少了一件事

我的页面有问题...


-

Aaron Bertrand

SQL Server MVP
http: //www.aspfaq.com/


" Dave Anderson" < GT ********** @ spammotel.com>在消息中写道

新闻:呃************* @ TK2MSFTNGP11.phx.gbl ...
Is the motivation behind this type of exploration the ability to save < 20
keystrokes?

While garbage collection is supposedly a good thing, I still make it a habit
that I always use obj.close: set obj = nothing. Why leave anything to
chance? I''ve seen cases where adding set obj = nothing suddenly eliminated
Unspecified Error problems with Access, among other things.

It takes far longer to even think about this issue than it will ever take to
simply continue following the best practices I always have, and my coding is
always consistent... if nothing else, it''s one less thing I have to check if
I''m having a problem with a page...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:er*************@TK2MSFTNGP11.phx.gbl...
去年9月,我们中的一些人参与讨论用JScript编写的ASP脚本中释放资源的问题。可以在这里看到:
http://tinyurl.com/2flzt

我最近阅读了Eric Lippert关于在VB中使用* Nothing *赋值
的文章( http://blogs.msdn.com/ericlippert/ar...28/122259.aspx
在离开范围之前,并且对他所说的话感到震惊,
我必须说它让我对ASP的含义感到好奇,无论是用JScript还是VBScript编写的

和Lippert一样,我看到很多文档/建议表明这些作业需要
,但很少有经验证据证明它很重要。我这并不意味着建议*不需要*任何*任务*我b $ b只是想知道是否有人打扰检查它是否仍然与最近几代IIS和诸如此类常用工具有关。 ADO或CDO。

评论?

-
戴夫安德森

未经请求的商业电子邮件将以
Last September, some of us engaged in a discussion of freeing resources in
ASP scripts written in JScript. It can be seen here:
http://tinyurl.com/2flzt

I recently read Eric Lippert''s article on the use of *Nothing* assignments
in VB (http://blogs.msdn.com/ericlippert/ar...28/122259.aspx)
right before going out of scope, and was shocked by what he had to say, and I must say it has me curious about the implications for ASP, whether written in JScript or VBScript.

Like Lippert, I have seen a lot of documentation/advice that suggests a need for such assignments, but little empirical evidence that it matters. I do
not mean to suggest that *Nothing* assignments are NEVER required, I simply wonder if anyone has bothered to check if it still matters with recent
generations of IIS and such common tools as ADO or CDO.

Comments?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of


每条消息500。
使用此电子邮件地址即表示同意这些条款。请不要
直接与我联系或要求我直接与您联系以获取帮助。如果您的问题值得询问,那就值得发帖。
500 per message. Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it''s worth posting.



这篇关于重温一位老朋友:设置oRS = Nothing的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆