RAII object constructed at the beginning of main() and destructed implicitly at the end of main().

Synopsis

Declared in <folly/init/Init.h>

class [[nodiscard]] Init;

Description

The constructor calls common init functions in the necessary order. Among other things, this ensures that folly::Singletons are initialized correctly and installs signal handlers for a superior debugging experience. It also initializes gflags and glog.

The destructor destroys all singletons managed by folly::Singleton, yielding better shutdown behavior when performed at the end of main(). In particular, this guarantees that all singletons managed by folly::Singleton are destroyed before all Meyers singletons are destroyed.

Member Functions

Name

Description

Init [constructor]

Constructors

~Init [destructor]

Destroys the guard and tears down folly singletons.

operator=

Assignment operators

Return Value

Note

The return value should not be discarded.

Created with MrDocs