mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 00:42:31 +00:00
fix memory leaks
This commit is contained in:
@@ -50,14 +50,19 @@
|
||||
|
||||
for (RNSVGNode *node in self.subviews) {
|
||||
if ([node isKindOfClass:[RNSVGNode class]]) {
|
||||
[node saveDefinition];
|
||||
[node renderTo:context];
|
||||
|
||||
if (node.responsible && !self.responsible) {
|
||||
self.responsible = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (RNSVGNode *node in self.subviews) {
|
||||
if ([node isKindOfClass:[RNSVGNode class]]) {
|
||||
[node saveDefinition];
|
||||
[node renderTo:context];
|
||||
}
|
||||
}
|
||||
// CGImageRef image = CGBitmapContextCreateImage(context);
|
||||
// NSData *imageData = UIImagePNGRepresentation([[UIImage alloc] initWithCGImage:image]);
|
||||
// NSString *base64 = [imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
|
||||
|
||||
Reference in New Issue
Block a user