From 6c7280c69711e0ae0c6a24a67df0d1ffd3ff3396 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 4 Jun 2015 20:29:31 +0500 Subject: [PATCH] Check if colorCache dictionary < 2048 --- React/Base/RCTConvert.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 3c9143c17d29ba..854daaf7543d24 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -595,8 +595,8 @@ + (UIColor *)UIColor:(id)json color = [UIColor whiteColor]; } - // Cache and return - if (json) { + // Cache if possible and return + if (json && [colorCache count] < 204) { colorCache[json] = color; } return color;