ReferenceCountedArray vs array of ref count pointers

I was doing something like this:


typedef ReferenceCountedObjectPtr<Node> Ptr;

Array<Node::Ptr> mNodes;

... but then I spotted ReferenceCountedArray so I could do this:

ReferenceCountedArray<Node> mNodes;

This seems to work identically, within my limited use case anyway.

My question is : what does ReferenceCountedArray give me that I can't do with an Array of ref count pointers?

There's some more efficiency in using ReferenceCountedArray, and the syntax will be simpler in a lot of use-cases, but yes, either method will work!