I receive an exception for the code below in the juce_variant class, line 370 (destructor)
I’m trying to create a static global variable, is this wrong?
#include "../JuceLibraryCode/JuceHeader.h"
static const Image& im = ImageFileFormat::loadFrom(BinaryData::no_cica_png, BinaryData::no_cica_pngSize);
//==============================================================================
class TestApplication : public JUCEApplication
{
public:
//==============================================================================
TestApplication() {
std::cout << "Im: " << im.getHeight() << "\n";
}
const String getApplicationName() { return ProjectInfo::projectName; }
const String getApplicationVersion() { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() { return true; }
//==============================================================================
void initialise (const String& commandLine)
{
// Add your application's initialisation code here..
}
void shutdown()
{
// Add your application's shutdown code here..
}
//==============================================================================
void systemRequestedQuit()
{
// This is called when the app is being asked to quit: you can ignore this
// request and let the app carry on running, or call quit() to allow the app to close.
quit();
}
void anotherInstanceStarted (const String& commandLine)
{
// When another instance of the app is launched while this one is running,
// this method is invoked, and the commandLine parameter tells you what
// the other instance's command-line arguments were.
}
};