Life Scope

Discussion in 'ASP .Net Datagrid Control' started by Chan, Feb 25, 2004.

  1. Chan

    Chan Guest

    In MS' TimeTracker sample app, a middle-tier component BLL has a class
    named TimeEntry. It's used in TimeEntry.aspx to remember a certain
    state of an entry.
    I'm wondering

    1> what's the life scope of TimeEntry, and when it will be scraped?

    2> how do we tell the GC not to touch it?
    Chan, Feb 25, 2004
    #1
    1. Advertising

  2. Your post went unanswered. Have you resolved this issue?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Chan" <> wrote in message
    news:...
    > In MS' TimeTracker sample app, a middle-tier component BLL has a class
    > named TimeEntry. It's used in TimeEntry.aspx to remember a certain
    > state of an entry.
    > I'm wondering
    >
    > 1> what's the life scope of TimeEntry, and when it will be scraped?
    >
    > 2> how do we tell the GC not to touch it?
    Alvin Bruney [MVP], Mar 2, 2004
    #2
    1. Advertising

  3. Chan

    Chan Guest

    No, not yet.

    There is no Session_End to handle it.

    Any input?

    Thanks!
    Chan, Mar 3, 2004
    #3
  4. I'd be willing to help you if you could just repost the original question.

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Chan" <> wrote in message
    news:...
    > No, not yet.
    >
    > There is no Session_End to handle it.
    >
    > Any input?
    >
    > Thanks!
    Alvin Bruney [MVP], Mar 4, 2004
    #4
  5. Chan

    Chan Guest

    Alvin,

    Here is my original post >>>>>>>>>>>>>>>>>

    In MS' TimeTracker sample app, a middle-tier component BLL has a class
    named TimeEntry. It's used in TimeEntry.aspx to remember a certain
    state of an entry.
    I'm wondering

    1> what's the life scope of TimeEntry, and when it will be scraped?

    2> how do we tell the GC not to touch it?

    <<<<<<<<<<<<<<<<<<<<<<

    Thank you for your help!
    Chan, Mar 4, 2004
    #5
  6. timetracker.aspx is built into a dll upon an initial request for that page.
    Once the page is served, it is cached for further use. If there is a period
    of inactivity, the cache is cleared and the reference to the dll is removed
    from scope.

    To prevent the GC from collecting, simply maintain a reference to the
    assembly. Be careful though because it won't be collected unless the
    reference goes away leading to a potential memory leak.

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Chan" <> wrote in message
    news:...
    > Alvin,
    >
    > Here is my original post >>>>>>>>>>>>>>>>>
    >
    > In MS' TimeTracker sample app, a middle-tier component BLL has a class
    > named TimeEntry. It's used in TimeEntry.aspx to remember a certain
    > state of an entry.
    > I'm wondering
    >
    > 1> what's the life scope of TimeEntry, and when it will be scraped?
    >
    > 2> how do we tell the GC not to touch it?
    >
    > <<<<<<<<<<<<<<<<<<<<<<
    >
    > Thank you for your help!
    Alvin Bruney [MVP], Mar 5, 2004
    #6
    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. Chan

    Life Scope

    Chan, Feb 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    735
  2. Paul Opal
    Replies:
    12
    Views:
    927
    Paul Opal
    Oct 11, 2004
  3. ann
    Replies:
    13
    Views:
    649
    Patricia Shanahan
    Sep 13, 2005
  4. Ranga

    scope and life of tagged structure

    Ranga, Mar 17, 2005, in forum: C Programming
    Replies:
    4
    Views:
    350
    CBFalconer
    Mar 20, 2005
  5. Steven T. Hatton
    Replies:
    9
    Views:
    458
Loading...

Share This Page