Should I call CkSettings::initializeMultithreaded() just only once in a multithreaded program? I have a multithreaded program include a couple of classes/COMs. Each of them has already called CkSettings::initializeMultithreaded() once.
Would it be wrong if I call CkSettings::initializeMultithreaded() more than once in a multithreaded program? Would it be OK if I never call CkSettings::initializeMultithreaded() in a multithreaded program?
asked Sep 09 '12 at 22:18
I once had a similar question (by email in 2009). Here my original question:
We develop an EXE and several DLLs. Only some of the DLLs use Chilkat libraries and are linking to it.
And here Matt's response
1) Don't worry about calling cleanupMemory -- it only exists for those programmers wanting to verify that there are no memory leaks at program exit. Here is more information: http://www.chilkatsoft.com/p/p_109.asp 2) Call UnlockComponent once in each DLL/EXE that uses Chilkat. 3) initializeMultithreaded does nothing and probably never will. I would simply omit it at this point. If it is ever required, it will be in the release notes of a future version.
answered Sep 10 '12 at 04:33
Yes, the call to initializeMultithreaded can still be left out. If you wish to be more explicit about the fact that your program is multi-threaded, it might be worth adding.
answered Sep 10 '12 at 12:15