use reset() instead of assignement from NULL to reset a shared_ptr, as apparently only very new compilers allow the latter [[Imported from SVN: r6430]]