jaredpar's WebLog

Code, rants and ramblings of a programmer.

Browse by Tags

Tagged Content List
  • Blog Post: Thread Local Storage template

    Thread local storage is another method of synchronization between threads. It is different that most synchronization cases because instead of sharing state between threads it enables developers to have independent, thread specific pieces of data which have a similar or common purpose. The uses of thread...
  • Blog Post: Gotcha: CComPtrBase<T> assignment

    Today what started out as a crash due to a pure virtual call turned into finding a gotcha in CComPtrBase<T>. Essentially the code in question boiled down to the following. Can you spot the problem? void GetAStudent(CComPtrBase<T> &spStudent) { CComPtr<Student> spLocal; // Do...
  • Blog Post: Reference values in C++

    Reference values are a powerful feature of C++ but I find they have one significant detractor. A developer can not look at an API call and determine if a parameter is being passed by reference or value (VB has the same problem). IMHO this is one item that C# got 100% correct. In C# developers must say...
  • Blog Post: Multiple paths to IUnknown

    ATL has a lot of great tools for COM programming and CComPtr is a good example. It's a smart pointer class which manages the reference count of an underlying COM object. One of it's limitations though is it will only work properly when the inheritance chain for a class has only one path to IUnknown...
  • Blog Post: C++ Placement New: Tracking down a crash

    See my previous two posts on an introduction to placement new if you are unfamiliar with the subject. http://blogs.msdn.com/jaredpar/archive/2007/10/16/c-new-operator-and-placement-new.aspx http://blogs.msdn.com/jaredpar/archive/2007/10/17/c-placement-new-and-allocators.aspx Recently I did a bit of work...
Page 1 of 1 (5 items)