Due to code refactoring a class that is part of some library interface now uses COM internally. This means that CoInitialize
/ CoUninitialize
needs to be called now on any thread which wants to use my library class.
To allow library users a smooth transition towards the new version I plan to add the call to CoInitialize
to the class constructor and CoUninitialize
to the class destructor. Will this add some significant runtime overhead, assuming that the class is instantiated 1-2 times per second?