Hang during CoFreeUnusedLibrary when moving from ArcEngine 9.3.1 to 10

Discussion created by chrisb_b on Jun 8, 2011
Latest reply on Oct 13, 2011 by chrisb_b
I have a working c++ application (SAM) that uses ArcEngine 9.3.1 manage raster maps in a file geodatabase.  Replacing ArcEngine with version 10 SP2 causes my application to hang 60 seconds after Engine is last used.  The only changes that I have made is the new call to ArcGISVersionLib to enable the application to bind to version 10.  Engine 10 is working fine with another application, built from scratch but but using similar calls to the problem application.

With Engine 10, SAM loads its first few maps quite happily.  When it is left for 60 seconds MFC calls CoFreeUnusedLibraries to remove any unused COM components.  The debug output window shows that it has unloaded Display.dll and FdaRel.dll, then the application hangs.

With Engine 9.3.1 the call unloads many Esri DLLs quite happily.  The one after FdaRel.dll, which may be the problem, is FgdbRasterDB.dll.

Has anyone else seen these symptoms when upgrading an application from using 9.3.1 to 10?

Thanks in advance

Chris BB