Closed
Description
Is it valid to have an application which does...
Aws::InitAPI();
// Make some AWS SDK calls
Aws::InitAPI();
// Make some more AWS SDK calls
Aws::ShutdownAPI();
// Make yet more AWS SDK calls
Aws::ShutdownAPI();
// OK now I'm all done - no more SDK calls
There are cases where due to how classes are designed, it's difficult / impossible for them to know if a previous step has initialized the SDK (for example, I have a plugin which calls the SDK - the main application which loads my plugin has no idea about the SDK so couldn't possibly initialize it). If this isn't safe, I can use a singleton on my end (I just hate singletons :-P ).
Thanks.