Friday, June 04, 2004

I quit!

Unfortunately, I've tried everything and it wasn't enough. The leaks may seem harmless on a desktop application, which can leak a few handles and then wait for the garbage collector to appear, but in a server application it's simply a killer. On a 4-way SMP, there may be up to 100 simultaneous request running (each request takes an average of 5 seconds to complete), and if each of them leak 30 handles, I'm leaking 600 handles/second. The GC simply isn't smart enough to clean all of them and the number never gets down.
Since Crivo only is supported on Windows 2000, XP and 2003 with the last Service Pack applied, an alternative way is by using WinHTTP. No code in Crivo calls directly the .NET HTTP libraries, we provide a smart facade (similar to System.Net.WebClient, but smarter), so it's "just" a matter of rewriting our HTTP library to use WinHTTP.
BTW, I just discovered that WinHTTP is not included on the SDK that came with VS.NET 2003, and since it's now part of the OS (a good thing, IMO), it's not available for separate download anymore. To get it now, we need to run Platform SDK update on all development machines and on the build machine (~250 MB). :sigh:
I think I'll start by writing some C++ wrapper classes. Those who worked with me in the past know that I've always been a fan of RAII.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?