Why should I close and destroy a recordset?

后端 未结 2 1330
谎友^
谎友^ 2021-01-23 08:54

I read this article: http://www.utteraccess.com/wiki/Recordsets_for_Beginners, and it says that it\'s important for me to close and destroy RS\'s like this:
rs.close S

2条回答
  •  醉梦人生
    2021-01-23 09:20

    rs.close cleans up the resources that are used internally, however because ASP is a single process that doesn't have any GC the Set rs = Nothing aids in the clean up.

    It de-references your objects, without it you'll have a memory leak. nice isn't it?

提交回复
热议问题