Use MakeShared rather than MakeShareable

Rather than MakeShareable(new Foo), prefer to use MakeShared<Foo>().

The difference is that the latter will allocate a single memory block to host both the reference counter and the shared object. The former will allocate the object first (new), then allocate the reference counter (MakeShareable).
This makes MakeShared faster than MakeShareable and helps reduce memory fragmentation when allocating/deallocating shared object frequently. In the lecture’s context, it won’t make any difference, but it’s better build the muscle memory :slight_smile: