Edit: I decided to add another question since they're both related to the config retrieval in a way and didn't want to open another thread for it.
They may be a simple questions but it comes from the fact that my background is not C++.
First question:
IIS7 modules can allocate memory that can be managed by IIS itself. For the administration section, it seems that every object you request, like for example a IAppHostProperty, must be released after using it. The MSDN sample shows it but the documentation doesn't state it directly (maybe because the object derive from IUnknown).
Some of the code path in our application code exit before releasing the object(s). My guess is that it will create a memory leak. Is my reasoning correct?
Second question:
When retrieving part of the configuration, you must use a VARIANT struct. A helper function for reading specific part of the configuration was made. Inside this function, I found a static VARIANT. This static VARIANT is returned with the content of the value requested on each call.
All I can read is usually static inside function is non thread safe and it concerns me. I'm no MT expert but since I guess every request for the module must be running in it's own thread, maybe there is no threading issue or am I wrong?
Thank you in advance for any information on the subject.