Why does this simple loop leads to a memory leak when using the SP 2013 server api?
const int INT_Constant = 5; private static void CreateSC() { Microsoft.SharePoint.Administration.SPWebApplication app = Microsoft.SharePoint.Administration.SPWebApplication.Lookup(new Uri("http://demosrv")); for (int i = 0; i < INT_Constant; i++) { Console.WriteLine(" Create {0}", i); using (SPSite newSite = app.Sites.Add("/sites/memory" + i, "demo\\administrator", null)) { } } }
When i analyze the memory with a memory profile it seems that the Microsoft.Sharepoint.Administration.SPVolatileCache keeps the spsite entries in memory...
Thanks
Marco