OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_Initialisation.h>
Public Member Functions | |
ScopedJuceInitialiser_GUI () | |
~ScopedJuceInitialiser_GUI () | |
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.
Definition at line 69 of file juce_Initialisation.h.
juce::ScopedJuceInitialiser_GUI::ScopedJuceInitialiser_GUI | ( | ) |
The constructor simply calls initialiseJuce_GUI().
Definition at line 477 of file juce_MessageManager.cpp.
juce::ScopedJuceInitialiser_GUI::~ScopedJuceInitialiser_GUI | ( | ) |
The destructor simply calls shutdownJuce_GUI().
Definition at line 478 of file juce_MessageManager.cpp.