Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e5e3e54

Browse files
committed
temporary fix for a memory leak
see: flutter/flutter#69305
1 parent 3c63cd7 commit e5e3e54

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@
437437
for (UIView* sub_view in [flutter_view subviews]) {
438438
[sub_view removeFromSuperview];
439439
}
440+
// See: https://github.com/flutter/flutter/issues/69305
441+
for (auto it = touch_interceptors_.begin(); it != touch_interceptors_.end(); it++) {
442+
FlutterTouchInterceptingView* view = it->second.get();
443+
[view removeFromSuperview];
444+
}
445+
touch_interceptors_.clear();
440446
views_.clear();
441447
composition_order_.clear();
442448
active_composition_order_.clear();

testing/ios/IosUnitTests/IosUnitTests.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@
332332
/* Begin XCBuildConfiguration section */
333333
0D6AB6D022BB05E200EEE540 /* Debug */ = {
334334
isa = XCBuildConfiguration;
335+
baseConfigurationReference = 0D6AB73E22BD8F0200EEE540 /* FlutterEngineConfig.xcconfig */;
335336
buildSettings = {
336337
ALWAYS_SEARCH_USER_PATHS = NO;
337338
CLANG_ANALYZER_NONNULL = YES;
@@ -391,6 +392,7 @@
391392
};
392393
0D6AB6D122BB05E200EEE540 /* Release */ = {
393394
isa = XCBuildConfiguration;
395+
baseConfigurationReference = 0D6AB73E22BD8F0200EEE540 /* FlutterEngineConfig.xcconfig */;
394396
buildSettings = {
395397
ALWAYS_SEARCH_USER_PATHS = NO;
396398
CLANG_ANALYZER_NONNULL = YES;
@@ -484,7 +486,6 @@
484486
};
485487
0D6AB6D622BB05E200EEE540 /* Debug */ = {
486488
isa = XCBuildConfiguration;
487-
baseConfigurationReference = 0D6AB73E22BD8F0200EEE540 /* FlutterEngineConfig.xcconfig */;
488489
buildSettings = {
489490
BUNDLE_LOADER = "$(TEST_HOST)";
490491
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
@@ -528,7 +529,6 @@
528529
};
529530
0D6AB6D722BB05E200EEE540 /* Release */ = {
530531
isa = XCBuildConfiguration;
531-
baseConfigurationReference = 0D6AB73E22BD8F0200EEE540 /* FlutterEngineConfig.xcconfig */;
532532
buildSettings = {
533533
BUNDLE_LOADER = "$(TEST_HOST)";
534534
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;

testing/ios/IosUnitTests/IosUnitTests.xcodeproj/xcshareddata/xcschemes/IosUnitTests.xcscheme

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES"
3030
systemAttachmentLifetime = "keepNever">
31+
<AdditionalOptions>
32+
<AdditionalOption
33+
key = "MallocStackLogging"
34+
value = ""
35+
isEnabled = "YES">
36+
</AdditionalOption>
37+
</AdditionalOptions>
3138
<Testables>
3239
<TestableReference
3340
skipped = "NO">

0 commit comments

Comments
 (0)