]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/samples/layout/FontTableCache.cpp
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / samples / layout / FontTableCache.cpp
index 75130ff3af13ef36f016777b9214004c3e77bfec..c6547be2f31f4692469223c5112dcd5a529c751c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  **********************************************************************
- *   Copyright (C) 2003, International Business Machines
+ *   Copyright (C) 2003 - 2008, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  **********************************************************************
  */
@@ -37,7 +37,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 +49,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) {