mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
28 lines
702 B
Objective-C
28 lines
702 B
Objective-C
// Copyright 2018 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// TODO(dnfield): This belongs in the engine repo.
|
|
#import <Flutter/Flutter.h>
|
|
#import <XCTest/XCTest.h>
|
|
|
|
@interface ViewControllerRelease : XCTestCase
|
|
@end
|
|
|
|
|
|
@implementation ViewControllerRelease
|
|
|
|
- (void)testReleaseFlutterViewController {
|
|
__weak FlutterEngine* weakEngine;
|
|
@autoreleasepool {
|
|
FlutterViewController* viewController = [[FlutterViewController alloc]
|
|
init];
|
|
weakEngine = viewController.engine;
|
|
[viewController viewWillAppear:NO];
|
|
[viewController viewDidDisappear:NO];
|
|
}
|
|
XCTAssertNil(weakEngine);
|
|
}
|
|
|
|
@end
|