Memory leak - any guesses where it might be

I am working on a .Net project (Windows service) and I have detected a memory leak. Using the ANTS Memory profiler, I determined that the root cause is an unmanaged memory area. But I do not use COM / COM + or p / invoke - pure .Net (DataAcces - Fluent nHibernate, Automapper, WCF).

Hypothetically, what could be the reason? How can I find a bottleneck. I am interested in any experience that has encountered and solved this kind of isseus

A bit more detailed:

  • I know how objects manage (and do it right)
  • I (almost) do not use events
  • I use timers
  • I use multithreading (but rather parallelism)
  • My application is not stateless - I track objects throughout their life cycle
+3
source share
1 answer

About memory leaks

In general, memory leaks can still exist in .net. (Sort, not all of them are memory leaks in a text book per se). As with things that get stuck in generation 2 garbage collection or when objects that inherit from IDisposable or, for that matter, threads, events, SQL connections that remain open and mess with you connection pool are not deleted. Although I am not an expert in this matter, I will show you a couple of places that can help you in your search.

. , endevor. - , .NET ,

COM

.NET , com win32-, PInvoke . , , (, IL Spy), .

, .

.NET Wrapper Win32?

+2

All Articles