Skip to content

Commit 4a1ae49

Browse files
committed
Demo: Disabled image object backups for the icon
1 parent d819ef6 commit 4a1ae49

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

demo/source/core/SharedObjects.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,15 @@ void SharedObjects::restoreWindowDimensions (DocumentWindow& dw)
149149

150150
Image SharedObjects::getWindowIcon()
151151
{
152-
return ImageCache::getFromMemory (BinaryData::SquarePine_Logo_png, BinaryData::SquarePine_Logo_pngSize);
152+
static Image windowIcon;
153+
154+
if (windowIcon.isNull())
155+
{
156+
windowIcon = ImageCache::getFromMemory (BinaryData::SquarePine_Logo_png, BinaryData::SquarePine_Logo_pngSize);
157+
windowIcon.setBackupEnabled (false);
158+
}
159+
160+
return windowIcon;
153161
}
154162

155163
//==============================================================================

0 commit comments

Comments
 (0)