Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
GC Collects before end of scope
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var obj = new NoisyFinalizer(); var random = new Random(); for (var i = 0; i < 100; i++) { var bigArray = new int[10000]; for (var j = 0; j < bigArray.Length; j++) { bigArray[j] = random.Next(); } System.GC.Collect(); } Console.WriteLine("This should print before"); } } public class NoisyFinalizer { ~NoisyFinalizer() { Console.WriteLine("This should print after!"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Asignacion 692018
Date Comparison
enigma 2
Class
4 squares theorem
1stoccurence
Repeated char
Task 2
Stacks: Balanced Brackets -final
DAY !
Please log in to post a comment.