26static SpinLock deletedAtShutdownLock;
28static Array<DeletedAtShutdown*>& getDeletedAtShutdownObjects()
30 static Array<DeletedAtShutdown*> objects;
37 getDeletedAtShutdownObjects().add (
this);
43 getDeletedAtShutdownObjects().removeFirstMatchingValue (
this);
48JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4702)
58 localCopy = getDeletedAtShutdownObjects();
61 for (
int i = localCopy.
size(); --i >= 0;)
71 if (! getDeletedAtShutdownObjects().contains (deletee))
82 jassert (getDeletedAtShutdownObjects().isEmpty());
84 getDeletedAtShutdownObjects().clear();
87JUCE_END_IGNORE_WARNINGS_MSVC
Holds a resizable array of primitive or copy-by-value objects.
ElementType getUnchecked(int index) const
Returns one of the elements in the array, without checking the index passed in.
int size() const noexcept
Returns the current number of elements in the array.
Classes derived from this will be automatically deleted when the application exits.
virtual ~DeletedAtShutdown()
Destructor.
DeletedAtShutdown()
Creates a DeletedAtShutdown object.
Automatically locks and unlocks a mutex object.
#define JUCE_TRY
The JUCE_TRY/JUCE_CATCH_EXCEPTION wrappers can be used to pass any uncaught exceptions to the JUCEApp...
#define JUCE_CATCH_EXCEPTION
The JUCE_TRY/JUCE_CATCH_EXCEPTION wrappers can be used to pass any uncaught exceptions to the JUCEApp...