X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..3bb97ae2c034620e98ae804f2ed484db37b2e461:/icuSources/samples/layout/FontTableCache.cpp?ds=sidebyside diff --git a/icuSources/samples/layout/FontTableCache.cpp b/icuSources/samples/layout/FontTableCache.cpp index 75130ff3..7ca68b76 100644 --- a/icuSources/samples/layout/FontTableCache.cpp +++ b/icuSources/samples/layout/FontTableCache.cpp @@ -1,8 +1,12 @@ /* - ********************************************************************** - * Copyright (C) 2003, International Business Machines + ************************************************************************* + * © 2016 and later: Unicode, Inc. and others. + * License & terms of use: http://www.unicode.org/copyright.html#License + ************************************************************************* + ************************************************************************* + * Copyright (C) 2003 - 2008, International Business Machines * Corporation and others. All Rights Reserved. - ********************************************************************** + ************************************************************************* */ #include "layout/LETypes.h" @@ -37,7 +41,7 @@ FontTableCache::FontTableCache() FontTableCache::~FontTableCache() { for (int i = fTableCacheCurr - 1; i >= 0; i -= 1) { - LE_DELETE_ARRAY(fTableCache[i].table); + freeFontTable(fTableCache[i].table); fTableCache[i].tag = 0; fTableCache[i].table = NULL; @@ -49,6 +53,11 @@ FontTableCache::~FontTableCache() fTableCache = NULL; } +void FontTableCache::freeFontTable(const void *table) const +{ + LE_DELETE_ARRAY(table); +} + const void *FontTableCache::find(LETag tableTag) const { for (int i = 0; i < fTableCacheCurr; i += 1) {