ScopedJuceInitialiser_GUI Class Referencefinal
juce_events » messages

A utility object that helps you initialise and shutdown JUCE correctly using an RAII pattern. More...

## Public Member Functions

| ScopedJuceInitialiser_GUI ()
| The constructor simply calls initialiseJuce_GUI(). More...
| ~ScopedJuceInitialiser_GUI ()
| The destructor simply calls shutdownJuce_GUI(). More...

## Detailed Description

A utility object that helps you initialise and shutdown JUCE correctly using an RAII pattern.

When the first instance of this class is created, it calls initialiseJuce_GUI(), and when the last instance is deleted, it calls shutdownJuce_GUI(), so that you can easily be sure that as long as at least one instance of the class exists, the library will be initialised.

This class is particularly handy to use at the beginning of a console app's main() function, because it'll take care of shutting down whenever you return from the main() call.

Be careful with your threading though - to be safe, you should always make sure that these objects are created and deleted on the message thread.

## Constructor & Destructor Documentation

## ScopedJuceInitialiser_GUI()

ScopedJuceInitialiser_GUI::ScopedJuceInitialiser_GUI | ( |  | ) |

The constructor simply calls initialiseJuce_GUI().

## ~ScopedJuceInitialiser_GUI()

ScopedJuceInitialiser_GUI::~ScopedJuceInitialiser_GUI | ( |  | ) |

The destructor simply calls shutdownJuce_GUI().

The documentation for this class was generated from the following file:

- juce_Initialisation.h