response end, set rs = nothing

Discussion in 'ASP General' started by Slim, Jan 6, 2006.

  1. Slim

    Slim Guest

    I must admit I always forget to use "response.end"

    and I also forget to "set objects = nothing"

    how important are these things.

    I know my application run fine without them probably because I usually have
    plenty of processing power and ram.

    My understanding is that a small peace of ram will be tied up for a set
    period of time, and then it will be returned for use.

    Can someone elaborate
     
    Slim, Jan 6, 2006
    #1
    1. Advertising

  2. Slim wrote:
    > I must admit I always forget to use "response.end"


    So do I. I rarely use it except when I want the response to end at some
    point other than the default.

    >
    > and I also forget to "set objects = nothing"


    I used to be in the "if you create the object, destroy it" camp, but i've
    been convinced otherwise. Do a google for Lippert and Nothing to see what
    convinced me.

    I'm still in the "if you open it, close it" camp, which still has validity.

    The only place where I'm still a little anal about it is with ADO objects,
    where the failure to destroy objects in the proper order can defeat the
    garbage collector's efforts to clean up, leading to memory leaks. Child
    objects (such as recordsets) should be destroyed before parent objects
    (connections), so I still write the extra two lines of code to make sure
    this happens.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 6, 2006
    #2
    1. Advertising

  3. Slim

    Slim Guest

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > Slim wrote:
    >> I must admit I always forget to use "response.end"

    >
    > So do I. I rarely use it except when I want the response to end at some
    > point other than the default.
    >
    >>
    >> and I also forget to "set objects = nothing"

    >
    > I used to be in the "if you create the object, destroy it" camp, but i've
    > been convinced otherwise. Do a google for Lippert and Nothing to see what
    > convinced me.
    >
    > I'm still in the "if you open it, close it" camp, which still has
    > validity.
    >
    > The only place where I'm still a little anal about it is with ADO objects,
    > where the failure to destroy objects in the proper order can defeat the
    > garbage collector's efforts to clean up, leading to memory leaks. Child
    > objects (such as recordsets) should be destroyed before parent objects
    > (connections), so I still write the extra two lines of code to make sure
    > this happens.
    >
    > Bob Barrows
    >



    thats very much.

    I always close object but rarely destroy them also


    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
     
    Slim, Jan 6, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. csgraham74

    Response.Redirect at a response.end

    csgraham74, Jun 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    887
    Karl Seguin
    Jun 16, 2005
  2. Replies:
    9
    Views:
    4,752
  3. dotnettester

    Setting object = nothing after Response.end

    dotnettester, Sep 12, 2005, in forum: ASP General
    Replies:
    6
    Views:
    151
    Dave Anderson
    Sep 13, 2005
  4. Iñaki Baz Castillo
    Replies:
    9
    Views:
    203
    Igor Pirnovar
    Feb 26, 2009
  5. Devin Jeanpierre
    Replies:
    2
    Views:
    492
    Devin Jeanpierre
    Feb 14, 2012
Loading...

Share This Page