diff --git a/ios/FileLogger.mm b/ios/FileLogger.mm index cda4922..3f9a06a 100644 --- a/ios/FileLogger.mm +++ b/ios/FileLogger.mm @@ -17,6 +17,7 @@ @interface FileLogger () @property (nonatomic, strong) DDFileLogger* fileLogger; + @end @implementation FileLogger @@ -143,7 +144,12 @@ - (dispatch_queue_t)methodQueue { - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [controller dismissViewControllerAnimated:YES completion:nil]; } - +- (void)dealloc +{ + if (self.fileLogger) { + [DDLog removeLogger:self.fileLogger]; + } +} // Don't compile this code when we build for the old architecture. #ifdef RCT_NEW_ARCH_ENABLED - (std::shared_ptr)getTurboModule: