Skip to content

Commit dfba312

Browse files
Peter Arganyfacebook-github-bot
authored andcommitted
CoreFoundation memory management in RCTImageStoreManager
Summary: I recently learned that CoreFoundation object lifecycle is not managed automatically by ARC. RN appears to be leaking a few refs, this small stack of diffs cleans them up. Changelog: [Internal][Fixed] Fixed memory management of CF objects in RCTImageStoreManager Reviewed By: fkgozali Differential Revision: D18308313 fbshipit-source-id: 35c1152753578825871c28e1070599cd409b3a34
1 parent 595f5ac commit dfba312

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Libraries/Image/RCTImageStoreManager.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ - (id)sendRequest:(NSURLRequest *)request withDelegate:(id<RCTURLRequestDelegate
178178
MIMEType:MIMEType
179179
expectedContentLength:imageData.length
180180
textEncodingName:nil];
181+
CFRelease(UTI);
181182

182183
[delegate URLRequest:cancellationBlock didReceiveResponse:response];
183184
[delegate URLRequest:cancellationBlock didReceiveData:imageData];

0 commit comments

Comments
 (0)