This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit dc6e438
authored
Fix UIVisualEffectView leak in platform view filter (#52591)
I found this while migrating `FlutterPlatformViews_Internal.mm` to ARC #52535. I'll land this first.
```objc
if (_backdropFilterView != visualEffectView) {
_backdropFilterView = [visualEffectView retain];
}
```
should instead be something like:
```objc
if (_backdropFilterView != visualEffectView) {
id oldBackdropFilterView = _backdropFilterView;
_backdropFilterView = [visualEffectView retain];
[oldBackdropFilterView release];
}
```
But that's already what the built-in MRC `nonatomic, retain` property setter does, so use that instead.
Added a test that passes on this PR and fails on main.1 parent 3fb0011 commit dc6e438
File tree
3 files changed
+48
-20
lines changed- shell/platform/darwin/ios/framework/Source
- testing/ios/IosUnitTests/IosUnitTests.xcodeproj
3 files changed
+48
-20
lines changedLines changed: 47 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | | - | |
256 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
257 | 280 | | |
258 | | - | |
| 281 | + | |
259 | 282 | | |
260 | 283 | | |
| 284 | + | |
| 285 | + | |
261 | 286 | | |
262 | 287 | | |
263 | 288 | | |
| |||
595 | 620 | | |
596 | 621 | | |
597 | 622 | | |
| 623 | + | |
598 | 624 | | |
599 | 625 | | |
600 | 626 | | |
| |||
1302 | 1328 | | |
1303 | 1329 | | |
1304 | 1330 | | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1315 | 1346 | | |
| 1347 | + | |
| 1348 | + | |
1316 | 1349 | | |
1317 | | - | |
1318 | | - | |
| 1350 | + | |
1319 | 1351 | | |
1320 | 1352 | | |
1321 | 1353 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
| 175 | + | |
178 | 176 | | |
179 | 177 | | |
180 | 178 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
| |||
532 | 531 | | |
533 | 532 | | |
534 | 533 | | |
535 | | - | |
536 | 534 | | |
537 | 535 | | |
538 | 536 | | |
| |||
0 commit comments