UserPtr's parameter "ptr" is passed by value and has no affect on "ptr" inside of main. It succeeds because you got lucky - Print() didn't need to access *this for anything, so it never dereferenced a null pointer. However that's not guaranteed. This has nothing to do with smart pointers:
D: Ok!, it was weird, It never happened before to access a method that did not need to access *this when setting the pointer to NULL. Merely coincidence it was coded in this case.
It is a bit confusing, but I guess I should investigate a little more, later on.