On Sunday 03 April 2005 18:47, Scott Wheeler wrote: > On Sunday 03 April 2005 18:41, Allan Sandfeld Jensen wrote: > > CVS commit by carewolf: > > > > Double-deleting won't make it much better > > > > > > M +1 -1 mpcfile.cpp 1.12 > > > > > > --- kdesupport/taglib/mpc/mpcfile.cpp #1.11:1.12 > > @@ -54,7 +54,7 @@ public: > > ~FilePrivate() > > { > > + if (tag != ID3v1Tag && tag != APETag) delete tag; > > delete ID3v1Tag; > > delete APETag; > > - delete tag; > > delete ID3v2Header; > > delete properties; > > Hmm, that looks like a candidate for a nicer cleanup -- how about keeping > "tag" just as a pointer to whatever is being used and keeping the pointers > to the concrete ones separate? > The two tags need to be rendered separatly with different treatment, and CombinationTag was made genericly to facilitate any two tags. At best if CombinationTag is changed to delete any sub-tags, we could save the delete of anything but "tag", but we would still the need the direct and most importantly; typed, pointers. But I consider that sort of behaviour of containers slightly dangerous. `Allan