File tree 2 files changed +5
-3
lines changed
src/Microsoft.ML.Data/Data
test/Microsoft.ML.TestFramework
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -942,8 +942,10 @@ public override void Set(BatchColumn batchCol)
942
942
public override void Unset ( )
943
943
{
944
944
Contracts . Assert ( _index <= _count ) ;
945
- if ( Values != null )
946
- _pool . Return ( Values ) ;
945
+ // Remove all the objects from the pool
946
+ // to free up references to those objects
947
+ while ( _pool . Count > 0 )
948
+ _pool . Get ( ) ;
947
949
Values = null ;
948
950
_count = 0 ;
949
951
_index = 0 ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ void IDisposable.Dispose()
81
81
Cleanup ( ) ;
82
82
Process proc = Process . GetCurrentProcess ( ) ;
83
83
Console . WriteLine ( $ "Finished test: { FullTestName } " +
84
- $ "with memory usage { proc . PrivateMemorySize64 . ToString ( "N" , CultureInfo . InvariantCulture ) } ") ;
84
+ $ "with memory usage { proc . WorkingSet64 . ToString ( "N" , CultureInfo . InvariantCulture ) } ") ;
85
85
}
86
86
87
87
protected virtual void Initialize ( )
You can’t perform that action at this time.
0 commit comments