Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    Canada
    Posts
    6

    Unanswered: How important is to set object = nothing after using createObject method?

    Hello,

    I've being working with ASP pages for a few months, but I was just learning ASP as I working with the pages.

    I want to know once I used the "createObject" method, how important is it to set object = Nothing? I've being reading some articles saying that things created with createObject method has a page scope, so it will be gone when the page is close. However, some ppl says that it's best to set object= Nothing before leaving the page. So which of them is right? Would it cause memory leak if I don't set object = Nothing before I leave the page?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    The answer is, it might... you don't know... since you didn't write the clean up code, can you be certain it will be destroyed? Better to do it yourself and ensure this doesn't happen then to let be a possibility
    That which does not kill me postpones the inevitable.

Posting Permissions

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