File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/Microsoft.ML.Data/Data
test/Microsoft.ML.TestFramework Expand file tree Collapse file tree 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)
942942 public override void Unset ( )
943943 {
944944 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 ( ) ;
947949 Values = null ;
948950 _count = 0 ;
949951 _index = 0 ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ void IDisposable.Dispose()
8181 Cleanup ( ) ;
8282 Process proc = Process . GetCurrentProcess ( ) ;
8383 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 ) } ") ;
8585 }
8686
8787 protected virtual void Initialize ( )
You can’t perform that action at this time.
0 commit comments