Hi, I am trying write AnnotationFeatureClasses to a file geodatabase. When I write to the FGDB the first time it works ok. Lockfiles are created, but they are never deleted. The VisualStudio Debug-Console puts out the following line when I start to debug:
BGLEngine 0000023DA00ABB70 was created (from the thread id: 3136).
What should happen after all writes are done is that the Debug-Console prints the next line:
BGLEngine 0000023DA00ABB70 was destroyed (from the thread id: 3136).
and the lock on the FGDB should have been removed.
However, the Lock never gets released and I will be unable to write a second time to the FGDB. When I stop the application the debug-console prints:
CIM.DLL Terminating!
Starting BGLEngine leak diagnostics...
*****************************************************
Check for unreleased BGL classes.
BGLCanvas: 1 objects leaked
BGLPath: 1 objects leaked
BGLEngine: 1 object leaked
All references to this Engine's BGL objects become invalid now.
*****************************************************
BGLEngine 0000023DA00ABB70 (from the thread id: 3136) is not released before unloading of the BGLAPI.dll.
BGLEngine leak diagnostics completed.
From what I understand is that I have to call Dispose() on every ArcGIS-Object related to databases. I am not sure where I might have left any reference to the ArcGIS code dangling. From the BGLEngine leak diagnostics I am geussing that there might be something wrong with the CIMLabelClasses, but those cannot be disposed. The only places where Dispose() must be called is where I interact with a DataBase.