I think many developers have been wondering: How many bytes does an object instance take in managed code? What’s the limit for a CLR object? Are there any differences between 32-bit and 64-bit systems for memory allocation?
The discussion about the preference difference between FOREACH and FOR is not new. We all know that FOREACH is slower, but not all know why.
When I started learning .NET, one person told me that FOREACH is two times slower than FOR. He said this without any grounds. I took it for granted.
Eventually, I decided to explore the performance of both loops, and write this article to discuss nuances. (more…)
GDI leak (or, simply the usage of too many GDI objects) is one of the most common problems. It eventually causes rendering problems, errors, and/or performance problems. The article describes how we debug this problem.
In 2016, when most programs are executed in sandboxes wherefrom even the most incompetent developer cannot harm the system, I am amazed to face the problem I will speak about in this article. Frankly speaking, I hoped that this problem had gone forever together with Win32Api. Nevertheless, I faced it. Before that, I just heard horror stories about it from old more experienced developers. (more…)