FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Mono doesn't have GC.WaitForFullGCComplete · SciSharp/pythonnet@bfc0392 · GitHub

Repository navigation

Commit bfc0392

Browse files
committed
Mono doesn't have GC.WaitForFullGCComplete
1 parent cb55163 commit bfc0392

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎src/embed_tests/TestFinalizer.cs‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void SetUp()
2020
}
2121
catch (ArgumentNullException)
2222
{
23-
_PYTHONMALLOC = string.Empty;
23+
_PYTHONMALLOC = null;
2424
}
2525
Environment.SetEnvironmentVariable("PYTHONMALLOC", "malloc");
2626
_oldThreshold = Finalizer.Instance.Threshold;
@@ -33,16 +33,12 @@ public void TearDown()
3333
{
3434
Finalizer.Instance.Threshold = _oldThreshold;
3535
PythonEngine.Shutdown();
36-
if (string.IsNullOrEmpty(_PYTHONMALLOC))
37-
{
38-
Environment.SetEnvironmentVariable("PYTHONMALLOC", _PYTHONMALLOC);
39-
}
36+
Environment.SetEnvironmentVariable("PYTHONMALLOC", _PYTHONMALLOC);
4037
}
4138

4239
private static void FullGCCollect()
4340
{
4441
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
45-
GC.WaitForFullGCComplete();
4642
GC.WaitForPendingFinalizers();
4743
}
4844

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL