Hi Noel, On Wednesday, 2012-02-08 13:05:42 +0200, Noel Grandin wrote:
Attached path converts usage of SV_DECL_PTRARR_DEL in sc/inc/detdata.hxx and associated code to std::vector.
SV_DECL_PTRARR_DEL is one of those containers that take ownership of the objects pointed to, as you noticed and introduced deleting elements and DeleteAndDestroy() method, and as such it is a candidate for boost::ptr_vector instead of std::vector which makes workarounds like DeleteAndDestroy() unnecessary, erase()'ing an element will also delete the object. Care has to be taken when adding elements, ptr_vector if an element could not be added deletes the object, so a dangling pointer might be left and could be accessed, and a further delete would be attempted twice. I'd appreciate if you could rework the patch to use boost::ptr_vector instead. Thanks Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
Attachment:
pgpMuqAggjLqI.pgp
Description: PGP signature