JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::ScopedJuceInitialiser_GUI Class Referencefinal

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

#include <juce_Initialisation.h>

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.

{Events}

Constructor & Destructor Documentation

◆ ScopedJuceInitialiser_GUI()

juce::ScopedJuceInitialiser_GUI::ScopedJuceInitialiser_GUI ( )

The constructor simply calls initialiseJuce_GUI().

◆ ~ScopedJuceInitialiser_GUI()

juce::ScopedJuceInitialiser_GUI::~ScopedJuceInitialiser_GUI ( )

The destructor simply calls shutdownJuce_GUI().


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