(MemoryLeak) Freeing class-metadata for generated classes from BsonClassMap


in my application, I create CLR classes dynamically at runtime. These are kept in a cache and used for queries, etc. After some time, when the classes have not been used, they are removed from the cache to free memory.

But the MongoDb driver also caches these classes in the BsonClassMap, as far as I understand it. So the ClassLoader, resp. the Garbage-Collector can not unload these classes and their assemblies and I have a memory leak.

Is there a way to clean up the ClassMaps automatically?

With kind regards,