From 974f3a8e8e2abd9e9fde9f5cffa75c29d7e9f0b6 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Sat, 5 Oct 2019 18:44:26 +0300 Subject: [PATCH] fix(ios): memory leak in tspan, fixes #1073 --- ios/Text/RNSVGTSpan.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/Text/RNSVGTSpan.m b/ios/Text/RNSVGTSpan.m index 5d8e5364d..16b94c40d 100644 --- a/ios/Text/RNSVGTSpan.m +++ b/ios/Text/RNSVGTSpan.m @@ -273,6 +273,10 @@ - (CGFloat)getSubtreeTextChunksTotalAdvance CGRect textBounds = CTLineGetBoundsWithOptions(line, 0); CGFloat textMeasure = CGRectGetWidth(textBounds); cachedAdvance = textMeasure; + + CFRelease(attrString); + CFRelease(line); + return textMeasure; }