I’m really just using these code blocks out of convenience and ?cleaner code?. Anyone know why using actions like this gets GC.Collect spikes? Once I got how to use actions I just started using them all over the show so wishing I can understand how I can get around this
Using Action is not like using function pointer in C/C++. They look like they do the same but while function pointer are just reference to a method and then are just 32 or 64 bits, an Action is a actually a generic version of the old delegate:
delegate void Action(int a, int b);
Action action;
would be the same as:
Action<int, int> action;
But in this case a class is actually created since delegate is itself a class.