Results 1 to 3 of 3

Thread: objFSO

  1. #1
    Join Date
    Dec 1969

    Default objFSO

    Need a little bit of insight. I use objFSO on my site quite a lot, and it has been working well for me. One thing I did completely omit for some reason is the line<BR><BR>objFSO = Nothing<BR><BR>at the end of each script. I got the objTextStream = nothing. My question is does somebody know how critical it is to set objFSO to Nothing, should I go back and insert it everywhere, or is it not that important with respect to server performance, etc.<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default That's debatable..

    Some will tell you that you should destroy all objects, others say that it happens implicitly when the page unloads.<BR><BR>Personally, I wouldn&#039;t worry about it.

  3. #3
    Join Date
    Dec 1969

    Default Not important...

    The FileSystemObject takes up very little memory, esp. compared to things like ADODB.Recordset, so even if you do the SET to nothing as soon as you can after you are done with the object, you aren&#039;t saving much.<BR><BR>And don&#039;t worry, as soon as the ASP page is "finished" the object is automatically closed and garbage collected by ASP. <BR><BR>All those warnings you see about closing objects and setting the references to Nothing are mostly left over from version 1 of ASP back in 1997 or so, when there were some bugs in various components.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts