Static code analysis for C++ for free and for Pro

Up and until Visual Studio 2010 Microsoft decided that Code Analysis tool was available only for Visual Studio Premium and Ultimate editions. I have Visual Studio 2010 Pro w/MSDN subscriptions (actually 2 of them), but can not use Code Analysis tool. This however will change with upcoming Visual Studio 11. See the SDL blog: Code …

COM, BSTR or _bstr_t is leaking memory

COM, BSTR or _bstr_t is leaking memory. That was my first thought when I saw increasing number in Task Manager under memory colon for the process I am developing. Searching Google for quick answer I found famous Microsoft employee and blogger Larry Osterman’s blog post about Hey, why am I leaking all my BSTR’s? He …

2011 links no. 3

Interview With Sacha Barber in The Code Project. The ABA problem occurs during synchronization, when a location is read twice, has the same value for both reads, and “value is the same” is used to indicate “nothing has changed”. However, another thread can execute between the two reads and change the value, do other work, …