Skip to content

Multiple calls to InitAPI() / ShutdownAPI()? #456

Description

@asylvest

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions