Change copied_partition into a pointer (#759726)
Change Win_GParted::copied_partition from Partition object which is copied by value into a pointer to a Partition object object which is allocated, copy constructed and deleted. Required as part of the polymorphic implementation of Partitions. As before when managing the lifetime of pointers to objects in a class the Big 3 of destructor, copy constructor and copy assignment operator need to be considered. A destructor is added to finally delete copied_partition. A single Win_GParted object is only ever created and destroyed in main(). The class is never copy constructed or copy assigned. Make the compiler enforce this with private declarations and no implementations. Bug 759726 - Implement Partition object polymorphism
parent
b516b109
Please register or sign in to comment