Virtual Functions

  • [deleted]Challenge Author
    + 4 comments

    Wouldn't it be better to explicitly deallocate the objects at the end, i.e. through

    for(int i=0;i<n;i++)
    {
       delete per[i];
       per[i] = 0;
    }
    

    ? Not doing it might not be troublesome in this case, but perhaps doing it would encourage better practice. Do you agree?