From: Alexander F. <Ale...@gm...> - 2001-08-24 14:18:17
|
On Friday, 24. August 2001 14:17, RAD Kade 1 wrote: > On Friday 24 August 2001 06:02, you wrote: > > Ok, but we have to do the rest too. The cancel button has to restore > > the old track again if the cancelled track was not a new track and > > the used changed it. To do this we will probably have to clone the > > complete CDTrack object - with all objects stored in it. I hope we > > manage this in time. > > > > Alexander > > Yeah, this is what I started doing then stopped when I realized there > were api issues with the CDTrack destructor deleting the objects it > references (which is bad if we copy the pointers :). I guess "bool > throwaway" or something in the constructor is a simple and only > slightly smelly fix. :) It is not the only problem that the destructor deletes the subobjects. The objects can be discared elsewhere too (when the user changes from audio track to data track (ISO 9660 mastering) - the AudioFileInfo gets discarded and an IsoImage object will be created ) Er even worse : the user only changes these objects - a cancel cannot undo these changes. I probably will implement copy constructors which will do a deep copy of the objects - not only pointers. Alexander |