Skip to content

Commit b23ad94

Browse files
committed
Fix code in Tree docs (set parent to weak)
1 parent ea63430 commit b23ad94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tree/README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Here's a basic implementation in Swift:
2626
public class TreeNode<T> {
2727
public var value: T
2828

29-
public var parent: TreeNode?
29+
public weak var parent: TreeNode?
3030
public var children = [TreeNode<T>]()
3131

3232
public init(value: T) {

0 commit comments

Comments
 (0)