Web.Caching.Cache Memory Leak?

S

sternr

Hey,
(Sorry if the thread has been posted twice!)

I'm using the System.Web.Caching.Cache object in my Win App and
basically, it's great!
I use a sliding expiration TimeStamp to the object I put in the Cache.
When I try and get the object after it's sliding expiration time I get
null (as excepted of course),
But the problem is that the memory is never cleaned - my application's
memory just keeps on growing event after the object expiration time is
exceeded!
I tried event calling GC.Collect(), but still had no luck as my Win
App's memory did not lower at all...
Is there something I'm forgetting?

Thanks ahead

--sternr
 
I

Islamegy®

"application's memory just keeps on growing event after the object
expiration time is exceeded"
In my web application, web caching locate memory asp_net process not windows
application proccess.. i didn't test cache with win application but may be
the memory problem not related to cache.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

sternr said:
Hey,
(Sorry if the thread has been posted twice!)

I'm using the System.Web.Caching.Cache object in my Win App and
basically, it's great!

A cache is intended to be used in a web environment, why are you using it in
a windows app?

I tried event calling GC.Collect(), but still had no luck as my Win
App's memory did not lower at all...
Is there something I'm forgetting?

That Cache is intended to be used in a web app, not in a win app. Somebody
is holding a reference to the object, that's why it's not collected.

Why you need to use a Cache in a win app?
 

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

Similar Threads


Top