开发者

What kind of leak can cause instance leak of TimeBoundedCache.ExpirableItem in WCF?

开发者 https://www.devze.com 2023-03-13 10:55 出处:网络
I profiled my WCF application using the .NET Memory Profiler, and found that there is instance leak of types TimeBoundedCache.ExpirableItem and Byte[]:

I profiled my WCF application using the .NET Memory Profiler, and found that there is instance leak of types TimeBoundedCache.ExpirableItem and Byte[]:

What kind of leak can cause instance leak of TimeBoundedCache.ExpirableItem in WCF?

The comparison was made using two snapshot with 1 hour interval, and comparisons at different times also show the cons开发者_如何学编程istently increasing number of the two type. Other than those two types, there is no apparent leak.

The allocation stack looks like this:

What kind of leak can cause instance leak of TimeBoundedCache.ExpirableItem in WCF?

Does anyone recognize what might be causing this?


This is used by various security token cache implementations within the WCF security stack. I'm guessing your client is configured with the CacheIssuedTokens feature?

This cache will be routinely cleaned up by a purging process that runs on a background thread, so you don't need to worry about it leaking forever. However, you do need to realize that if you have several clients in your process all with their own security tokens, this will build up over time.

0

精彩评论

暂无评论...
验证码 换一张
取 消