1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-01 03:10:06 +00:00
This commit is contained in:
jules 2007-12-04 14:59:17 +00:00
parent 220c08ac0f
commit 8f1cd66a7d

View file

@ -319,7 +319,7 @@ public:
{
for (int i = cache.size(); --i >= 0;)
{
ATSFontHelper* const f = (ATSFontHelper*) cache[i];
ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i);
delete f;
}
@ -354,7 +354,7 @@ public:
{
for (int i = cache.size(); --i >= 0;)
{
ATSFontHelper* const f2 = (ATSFontHelper*) cache[i];
ATSFontHelper* const f2 = (ATSFontHelper*) cache.getUnchecked(i);
if (f == f2)
{
@ -370,18 +370,21 @@ public:
void timerCallback()
{
stopTimer();
for (int i = cache.size(); --i >= 0;)
{
ATSFontHelper* const f = (ATSFontHelper*) cache[i];
ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i);
if (f->refCount > 0)
if (f->refCount == 0)
{
stopTimer();
return;
cache.remove (i);
delete f;
}
}
delete this;
if (cache.size() == 0)
delete this;
}
juce_DeclareSingleton_SingleThreaded_Minimal (ATSFontHelperCache)