SAP Knowledge Base Article - Public

1659111 - GCHandle left in memory for each open and close of a Crystal Report in VS2010 application


  • Running the code bellow 100 times results in 100 GCHandles left in memory

   using (CrystalReport1 report = new CrystalReport1())


  • Crystal Reports for Visual Studio 2010
  • VS2010

Reproducing the Issue

  1. Create a report with no database connection or any other objects
  2. Open Task Manager
  3. Run the report using the code given in the Symptom section
  4. Task Manager shows that the number of handles in use by the w3wp process increases with each report run
  5. Number of handles does not decrease on use of Close and Dispose methods
  6. VS .NET Memory Profiler shows that the object being left behind is a handle of type CrystalDecisions.CrystalReports.Engine.ReportDocument.EventCallback
  7. Using sysinternals' handle.exe, the handles show up as:

1324: Mutant \Sessions\1\BaseNamedObjects\CrystalReportXalanInitilizeMutex2916l



  • This issue is resolved in Service Pack 2 for Crystal Reports for Visual Studio 2010
  • ADAPT01573472


CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 handle leak corrupt , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem


SAP Crystal Reports, developer version for Microsoft Visual Studio