Created
July 27, 2017 17:45
-
-
Save jkotas/6c92c0e432fa54a16a1a96f5e4528122 to your computer and use it in GitHub Desktop.
String::.ctor(ReadOnlySpan<char> span)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// csc /noconfig /nostdlib /r:System.Private.CoreLib.dll test.cs | |
using System; | |
using Internal.Runtime.Augments; | |
class My { | |
static void Work() { | |
for (;;) GC.Collect(); | |
} | |
static object[] a = new object[1000]; | |
static void Main() { | |
RuntimeThread.Create(Work).Start(); | |
var r = new Random(); | |
var s = new ReadOnlySpan<char>("Hello".ToCharArray()); | |
for (;;) { | |
a[r.Next(a.Length)] = new String(s); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment