As you below sample code, I am trying to use a unique pointer not give an error
int main() { auto a = make_unique<TestClass>(); a->Print(); a.reset(); a->Print();// this method call is still working }
Aucun commentaire:
Enregistrer un commentaire