Skip to content

Commit a2cc10a

Browse files
committed
Update shard initialization to include a TODO comment regarding potential memory leak
- Added a comment to the shard initialization code indicating that the reference count management may not be handled properly, suggesting a potential memory leak issue.
1 parent 2625e8e commit a2cc10a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/shards/shards.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ class ShardController: Equatable, Identifiable {
12331233
$0.baseAddress
12341234
}
12351235
cname.len = UInt64(n.count - 1)
1236-
self.init(native: G.Core.pointee.createShard(cname)!)
1236+
self.init(native: G.Core.pointee.createShard(cname)!) // TODO, this code is old, this might leak as its ref count is not managed
12371237
}
12381238

12391239
init(native: ShardPtr) {

0 commit comments

Comments
 (0)