Life Scope

C

Chan

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?
 
A

Alvin Bruney [MVP]

I'd be willing to help you if you could just repost the original question.
 
C

Chan

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!
 
A

Alvin Bruney [MVP]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top