Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6dd6d6

Browse files
authored
Merge pull request#36531 from dotnet/release/8.0-staging
[release/8.0] Merge release/8.0-staging to release/8.0
2 parents9a53711 +08cefb3 commita6dd6d6

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

‎src/EFCore.Relational/Query/Internal/GroupBySplitQueryingEnumerable.cs‎

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,19 @@ public void Dispose()
330330
{
331331
_relationalQueryContext.Connection.ReturnCommand(_relationalCommand!);
332332
_dataReader.Dispose();
333+
334+
if(_resultCoordinator!=null)
335+
{
336+
foreach(vardataReaderin_resultCoordinator.DataReaders)
337+
{
338+
dataReader?.DataReader.Dispose();
339+
}
340+
341+
_resultCoordinator.DataReaders.Clear();
342+
343+
_resultCoordinator=null;
344+
}
345+
333346
_dataReader=null;
334347
_dbDataReader=null;
335348
}
@@ -503,20 +516,30 @@ private static async Task<bool> InitializeReaderAsync(AsyncEnumerator enumerator
503516
returnfalse;
504517
}
505518

506-
publicValueTaskDisposeAsync()
519+
publicasyncValueTaskDisposeAsync()
507520
{
508-
if(_dataReaderis notnull)
521+
if(_dataReader!=null)
509522
{
510523
_relationalQueryContext.Connection.ReturnCommand(_relationalCommand!);
524+
await_dataReader.DisposeAsync().ConfigureAwait(false);
525+
526+
if(_resultCoordinator!=null)
527+
{
528+
foreach(vardataReaderin_resultCoordinator.DataReaders)
529+
{
530+
if(dataReader!=null)
531+
{
532+
awaitdataReader.DataReader.DisposeAsync().ConfigureAwait(false);
533+
}
534+
}
535+
536+
_resultCoordinator.DataReaders.Clear();
537+
_resultCoordinator=null;
538+
}
511539

512-
vardataReader=_dataReader;
513540
_dataReader=null;
514541
_dbDataReader=null;
515-
516-
returndataReader.DisposeAsync();
517542
}
518-
519-
returndefault;
520543
}
521544
}
522545
}

‎src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public void Dispose()
251251
{
252252
_relationalQueryContext.Connection.ReturnCommand(_relationalCommand!);
253253
_dataReader.Dispose();
254+
254255
if(_resultCoordinator!=null)
255256
{
256257
foreach(vardataReaderin_resultCoordinator.DataReaders)
@@ -407,6 +408,7 @@ public async ValueTask DisposeAsync()
407408
{
408409
_relationalQueryContext.Connection.ReturnCommand(_relationalCommand!);
409410
await_dataReader.DisposeAsync().ConfigureAwait(false);
411+
410412
if(_resultCoordinator!=null)
411413
{
412414
foreach(vardataReaderin_resultCoordinator.DataReaders)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp