Skip to content

Commit 6b7c873

Browse files
committed
no assignment to currentDisposables
1 parent 9bd4c38 commit 6b7c873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TorchSharp/DataLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public bool MoveNext()
344344
if (this.currentDisposables is not null) {
345345
using (var collate_scope = DisposeScopeManager.NewDisposeScope()) {
346346
Current = collate_fn(items, device);
347-
currentDisposables = collate_scope.DisposablesView.ToList();
347+
currentDisposables.AddRange(collate_scope.DisposablesView);
348348
collate_scope.Detach(currentDisposables);
349349
}
350350
}

0 commit comments

Comments
 (0)