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
This commit is contained in:
Peter Argany 2019-11-04 14:38:33 -08:00 коммит произвёл Facebook Github Bot
Родитель 595f5ac64d
Коммит dfba3129f4
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -178,6 +178,7 @@ RCT_EXPORT_METHOD(addImageFromBase64:(NSString *)base64String
MIMEType:MIMEType
expectedContentLength:imageData.length
textEncodingName:nil];
CFRelease(UTI);
[delegate URLRequest:cancellationBlock didReceiveResponse:response];
[delegate URLRequest:cancellationBlock didReceiveData:imageData];