Skip to content

Commit fdcace6

Browse files
author
Scott Goodson
committed
Add multiple view push to the ASTableViewStressTest app to evaluate memory issues
No issues found. Have not been able to create a leak either with the test itself or scrolling / popping back view controlliers.
1 parent 59c1a64 commit fdcace6

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed

examples/ASCollectionView/Sample.xcodeproj/project.pbxproj

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
9B92C8811BC17D3000EE46B2 /* SupplementaryNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C8801BC17D3000EE46B2 /* SupplementaryNode.m */; settings = {ASSET_TAGS = (); }; };
11-
9BA2CEA11BB2579C00D18414 /* Launchboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BA2CEA01BB2579C00D18414 /* Launchboard.storyboard */; settings = {ASSET_TAGS = (); }; };
10+
9B92C8811BC17D3000EE46B2 /* SupplementaryNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C8801BC17D3000EE46B2 /* SupplementaryNode.m */; };
11+
9BA2CEA11BB2579C00D18414 /* Launchboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BA2CEA01BB2579C00D18414 /* Launchboard.storyboard */; };
1212
AC3C4A641A11F47200143C57 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A631A11F47200143C57 /* main.m */; };
1313
AC3C4A671A11F47200143C57 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A661A11F47200143C57 /* AppDelegate.m */; };
1414
AC3C4A6A1A11F47200143C57 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A691A11F47200143C57 /* ViewController.m */; };
@@ -120,6 +120,7 @@
120120
AC3C4A5B1A11F47200143C57 /* Frameworks */,
121121
AC3C4A5C1A11F47200143C57 /* Resources */,
122122
A6902C454C7661D0D277AC62 /* Copy Pods Resources */,
123+
EC37EEC9933F5786936BFE7C /* Embed Pods Frameworks */,
123124
);
124125
buildRules = (
125126
);
@@ -190,6 +191,21 @@
190191
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
191192
showEnvVarsInLog = 0;
192193
};
194+
EC37EEC9933F5786936BFE7C /* Embed Pods Frameworks */ = {
195+
isa = PBXShellScriptBuildPhase;
196+
buildActionMask = 2147483647;
197+
files = (
198+
);
199+
inputPaths = (
200+
);
201+
name = "Embed Pods Frameworks";
202+
outputPaths = (
203+
);
204+
runOnlyForDeploymentPostprocessing = 0;
205+
shellPath = /bin/sh;
206+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
207+
showEnvVarsInLog = 0;
208+
};
193209
F868CFBB21824CC9521B6588 /* Check Pods Manifest.lock */ = {
194210
isa = PBXShellScriptBuildPhase;
195211
buildActionMask = 2147483647;

examples/ASTableViewStressTest/Sample.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
05E2127E19D4DB510098F589 /* Frameworks */,
119119
05E2127F19D4DB510098F589 /* Resources */,
120120
F012A6F39E0149F18F564F50 /* Copy Pods Resources */,
121+
E671F9E92DFB9088485E493B /* Embed Pods Frameworks */,
121122
);
122123
buildRules = (
123124
);
@@ -189,6 +190,21 @@
189190
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
190191
showEnvVarsInLog = 0;
191192
};
193+
E671F9E92DFB9088485E493B /* Embed Pods Frameworks */ = {
194+
isa = PBXShellScriptBuildPhase;
195+
buildActionMask = 2147483647;
196+
files = (
197+
);
198+
inputPaths = (
199+
);
200+
name = "Embed Pods Frameworks";
201+
outputPaths = (
202+
);
203+
runOnlyForDeploymentPostprocessing = 0;
204+
shellPath = /bin/sh;
205+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
206+
showEnvVarsInLog = 0;
207+
};
192208
F012A6F39E0149F18F564F50 /* Copy Pods Resources */ = {
193209
isa = PBXShellScriptBuildPhase;
194210
buildActionMask = 2147483647;

examples/ASTableViewStressTest/Sample/AppDelegate.m

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,28 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1919
{
2020
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
2121
self.window.backgroundColor = [UIColor whiteColor];
22-
self.window.rootViewController = [[ViewController alloc] init];
22+
self.window.rootViewController = [[UINavigationController alloc] init];
23+
24+
[self pushNewViewControllerAnimated:NO];
25+
2326
[self.window makeKeyAndVisible];
27+
2428
return YES;
2529
}
2630

27-
@end
31+
- (void)pushNewViewControllerAnimated:(BOOL)animated
32+
{
33+
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
34+
35+
UIViewController *viewController = [[ViewController alloc] init];
36+
viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)];
37+
38+
[navController pushViewController:viewController animated:animated];
39+
}
40+
41+
- (void)pushNewViewController
42+
{
43+
[self pushNewViewControllerAnimated:YES];
44+
}
45+
46+
@end

examples/ASTableViewStressTest/Sample/ViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#define NumberOfSections 10
1818
#define NumberOfRowsPerSection 20
19-
#define NumberOfReloadIterations 500
19+
#define NumberOfReloadIterations 50
2020

2121
@interface ViewController () <ASTableViewDataSource, ASTableViewDelegate>
2222
{

0 commit comments

Comments
 (0)