@@ -58,7 +58,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
58
58
try dbPool. read { _ in }
59
59
60
60
// Simulate memory warning.
61
- NotificationCenter . default. post ( name: UIApplication . didReceiveMemoryWarningNotification, object: nil )
61
+ NotificationCenter . default. post (
62
+ name: NSNotification . Name ( rawValue: " UIApplicationDidReceiveMemoryWarningNotification " ) ,
63
+ object: nil )
62
64
63
65
// Postcondition: reader connection was closed
64
66
withExtendedLifetime ( dbPool) { _ in
@@ -84,7 +86,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
84
86
try dbPool. read { _ in }
85
87
86
88
// Simulate memory warning.
87
- NotificationCenter . default. post ( name: UIApplication . didReceiveMemoryWarningNotification, object: nil )
89
+ NotificationCenter . default. post (
90
+ name: NSNotification . Name ( rawValue: " UIApplicationDidReceiveMemoryWarningNotification " ) ,
91
+ object: nil )
88
92
89
93
// Postcondition: no reader connection was closed
90
94
withExtendedLifetime ( dbPool) { _ in
@@ -103,7 +107,9 @@ class DatabasePoolReleaseMemoryTests: GRDBTestCase {
103
107
}
104
108
105
109
// Simulate memory warning.
106
- NotificationCenter . default. post ( name: UIApplication . didReceiveMemoryWarningNotification, object: nil )
110
+ NotificationCenter . default. post (
111
+ name: NSNotification . Name ( rawValue: " UIApplicationDidReceiveMemoryWarningNotification " ) ,
112
+ object: nil )
107
113
108
114
// Make sure we can read
109
115
try dbPool. read { _ in }
0 commit comments