1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

ImageCache: Avoid data race on impl when accessing cache from a background thread

This commit is contained in:
reuk 2021-10-04 15:03:17 +01:00
parent 4b57909fb0
commit 752a676fa6
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -29,10 +29,10 @@ namespace juce
struct ImageCache::Pimpl : private Timer,
private DeletedAtShutdown
{
Pimpl() {}
Pimpl() = default;
~Pimpl() override { clearSingletonInstance(); }
JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL (ImageCache::Pimpl)
JUCE_DECLARE_SINGLETON (ImageCache::Pimpl, false)
Image getFromHashCode (const int64 hashCode) noexcept
{