Normal
I wasn't suggesting optimizing the entire code based on my suggestions. C# is fast enough, the GC is fast enough, for 90+% of normal coding operations. But there may be something critical which needs optimizing. I'm a huge fan of writing the most readable code possible, it's the only way in the long haul to support a stable code base.Regarding the dispose pattern, I didn't make this up, you can find that on numerious MSDN sites with regard to writing high performance C# code. And for good reason. If you're doing something which is pushing the CPU hard and your thread gets bumped out for the GC, that may be a situation which isn't acceptable from a performance standpoint. Maybe it causes a hiccup when recording video, who knows. Those bugs are hard to find and diagnose for sure.
I wasn't suggesting optimizing the entire code based on my suggestions. C# is fast enough, the GC is fast enough, for 90+% of normal coding operations. But there may be something critical which needs optimizing. I'm a huge fan of writing the most readable code possible, it's the only way in the long haul to support a stable code base.
Regarding the dispose pattern, I didn't make this up, you can find that on numerious MSDN sites with regard to writing high performance C# code. And for good reason. If you're doing something which is pushing the CPU hard and your thread gets bumped out for the GC, that may be a situation which isn't acceptable from a performance standpoint. Maybe it causes a hiccup when recording video, who knows. Those bugs are hard to find and diagnose for sure.