I am building a .NET windows service which is using an unmanaged C++ dll. both of my service and the c++ dll are using multi threading. I am running out of memory after some time (hours) while processing. I tried to measure the number of threads using "Performance counters" and I monitors the following values:
# of current logical Threads
# of current recognized threads
# of total recognized Threads
While the first one is steady and its value is reasonable the 2nd and the 3rd are not. they are always growing and reaching a huge number (over 1500). And they are equal !!!!
Should they be equal? I also didn t understand from this page if those counters will count both managed and unmanaged threads.
I suspect that the unmanaged code is alwayes launching new threads instead of reusing them, but I am not sure.
can anyone help? Thanks