Everybody thinks about garbage collection the wrong way
.NET MAUI Performance Investigations
New Features in the .NET 9 JIT
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| using Xamarin.Forms.Maps; | |
| namespace RouteMap.Model | |
| { | |
| public class GooglePoints | |
| { | |
| public static IEnumerable<Position> Decode(string encodedPoints) |
| %% | |
| %Valores | |
| v=[57.58 | |
| 57.10 | |
| 57.10 | |
| 56.61 | |
| 56.61 | |
| 57.10 | |
| 57.58 | |
| 57.10 |
| interface IProcessor<T,U> where T: unmanaged, IResult | |
| { | |
| T ProcessSingle(int x); | |
| async IAsyncEnumerable<T> ProcessMany(int[] xs, int batch) | |
| { | |
| static T[] ProccessBatch(Func<int,T> func, Span<int> list, in Range range) | |
| { | |
| (_, int length) = range.GetOffsetAndLenght(list.length); | |
| using var batcher = new Batcher<T>(stackalloc T[length]); |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Foundation; | |
| using RemovePageReproduction.iOS; | |
| using UIKit; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Internals; |
| class BlaP | |
| { | |
| public static async Task<T> FromJsonHttpContent<T>(HttpContent httpContent) | |
| { | |
| Stream stream = null; | |
| try | |
| { | |
| stream = await httpContent.ReadAsStreamAsync(); | |
| var res = DeserializeJsonFromsStream<T>(stream); |
| new ViewModel().Run(); | |
| class ViewModel | |
| { | |
| private bool flag = true; | |
| public bool Flag {get; set;} = false; | |
| public void Run() | |
| { | |
| using(new HoldAndChangeValue(ref flag, () => Flag = !Flag)) | |
| { |
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <!-- | |
| How to define a variable. | |
| Just stick a new node in a property group. | |
| --> | |
| <PropertyGroup> | |
| <!-- This node in a property group will define a variable --> | |
| <TestVariable>Test Variable Value</TestVariable> | |
| namespace MemoryLeakTest; | |
| static class MemoryTest | |
| { | |
| static readonly List<WeakReference<object>> weakReferences = []; | |
| public static int Count => weakReferences.Count; | |
| public static void Add(object obj) | |
| { |
Download the official Microsoft release or the latest one on GitHub
DON'T BE PUT OFF BY THE UI (But if you are take a look at CodeTrack)