I am trying to use shared_ptr to replace the C-Style pointer to avoid the memory leak.
T** list_of_T;
This is my old code. And I try to use shared_ptr in this way:
vector<shared_ptr<T>> vector_Of_Tptr;
But I think vector will use more memory, and I should rewrite some of my code. So could I change the code in some way like?
shared_ptr<shared_ptr<T> []> shared_list_of_T;
Is this a good practice?