File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22using Python . Runtime ;
33using System ;
44using System . Collections . Generic ;
5- using System . ComponentModel ;
65using System . Diagnostics ;
76using System . Linq ;
7+ using System . Runtime . CompilerServices ;
88using System . Threading ;
99
1010namespace Python . EmbeddingTest
@@ -47,7 +47,6 @@ private static bool FullGCCollect()
4747 }
4848
4949 [ Test ]
50- [ Ignore ( "Ignore temporarily" ) ]
5150 public void CollectBasicObject ( )
5251 {
5352 Assert . IsTrue ( Finalizer . Instance . Enable ) ;
@@ -104,7 +103,6 @@ public void CollectBasicObject()
104103 }
105104
106105 [ Test ]
107- [ Ignore ( "Ignore temporarily" ) ]
108106 public void CollectOnShutdown ( )
109107 {
110108 IntPtr op = MakeAGarbage ( out var shortWeak , out var longWeak ) ;
@@ -125,6 +123,7 @@ public void CollectOnShutdown()
125123 Assert . IsEmpty ( garbage ) ;
126124 }
127125
126+ [ MethodImpl ( MethodImplOptions . NoInlining ) ] // ensure lack of references to obj
128127 private static IntPtr MakeAGarbage ( out WeakReference shortWeak , out WeakReference longWeak )
129128 {
130129 PyLong obj = new PyLong ( 1024 ) ;
You can’t perform that action at this time.
0 commit comments