Check out example codes for "how to reduce garbage collection c#". It will help you in understanding the concepts better.
Code Example 1
//1.Set initial capacity for dynamic collections //2.Use ArrayPool for short - lived large arrays //3.Use Structs instead of Classes(sometimes) //4.Avoid Finalizers //5.Use StackAlloc for short - lived array allocations //6.Use StringBuilder, but not always //7.Use String Interning in very specific cases //8.Avoid memory leaks //Source = https://michaelscodingspot.com/avoid-gc-pressure/
Learn ReactJs, React Native from akashmittal.com