Skip to content

Commit ea12a71

Browse files
author
mac
committed
fix the CocoaList memory leak
1 parent ee194f8 commit ea12a71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SwiftUIX/Intramodular/List/_PlatformTableHeaderFooterView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import SwiftUI
88
#if os(iOS) || os(tvOS) || os(visionOS) || targetEnvironment(macCatalyst)
99

1010
class _PlatformTableHeaderFooterView<SectionModel: Identifiable, Content: View>: UITableViewHeaderFooterView {
11-
var parent: UITableViewController!
11+
weak var parent: UITableViewController!
1212
var item: SectionModel!
1313
var makeContent: ((SectionModel) -> Content)!
1414

Sources/SwiftUIX/Intramodular/List/_PlatformTableViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class _PlatformTableViewCell<ItemType: Identifiable, Content: View>: UITa
1515
let isSelected: Bool
1616
}
1717

18-
var tableViewController: UITableViewController!
18+
weak var tableViewController: UITableViewController!
1919
var indexPath: IndexPath?
2020

2121
var item: ItemType!

0 commit comments

Comments
 (0)