title: .NET 4.0 gives Unknown Exception on XP but it working good on Windows 7
body: <p>I've created program which is intensively using C# sockets and unmanaged C++ DLL with few useful functions Like this one.</p>
  
  <pre><code>[DllImport(DLLName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
      [return: MarshalAs(UnmanagedType.LPStr)]
      private static extern void calcData(float ask, float bid, float volume, float lastTrade, string symbolName, TQuoteType type, IntPtr str, out int size);
  </code></pre>
  
  <p>I'm using C# multithreading with 8-10 threads and every one is sending data by sockets every 200ms.<br>
  Program working fine on Windows 7 and Windows Server 2008 , but on XP and Windows Server 2003 it <strong>gives Out Of Memory System Exception after 2 days working</strong>. 
  I can't understand what is happening because maximum usage of RAM is 17mb. 
  Can anyone help me to solve this problem ?  </p>