Closed GoogleCodeExporter closed 9 years ago
$ find . -name "*dynamic*.cc" | xargs grep delete
./cld2_dynamic_data_tool.cc: delete header->tableHeaders;
./cld2_dynamic_data_tool.cc: delete header;
./cld2_dynamic_data_loader.cc: delete header;
./cld2_dynamic_data_loader.cc: delete header;
./cld2_dynamic_data_loader.cc: delete tableHeaders;
./cld2_dynamic_data_loader.cc: delete header;
./cld2_dynamic_data_loader.cc: delete tableHeaders;
./cld2_dynamic_data_loader.cc: delete((*scoringTables)->unigram_compat_obj);
// tableSummaries[0] from loadDataFile
./cld2_dynamic_data_loader.cc: delete(*scoringTables);
./cld2_dynamic_data_loader.cc: delete header->tableHeaders;
./cld2_dynamic_data_loader.cc: delete header;
I think all we need to fix here is the tableHeaders deletion work.
Original comment by andrewha...@google.com
on 15 May 2014 at 4:37
This is fixed in r161:
https://code.google.com/p/cld2/source/detail?r=161
I've run all the unit tests again, and confirmed that this fixes the issue in
the Chromium build system as well.
Original comment by andrewha...@google.com
on 16 May 2014 at 10:36
For posterity:
* This doesn't affect the binary file format at all. Previously generated dumps
will still work properly.
* Because the objects pointed to by the pointer were structs instead of class
instances, the use of delete and delete[] should be exactly equivalent (i.e.,
there is no destructor to call on each element of the array, so there is
nothing gained by adding the [])
This is purely a compiler-happiness change.
Original comment by andrewha...@chromium.org
on 16 May 2014 at 11:45
Also for posterity, I think what happened is that Chromium's build system
finally absorbed this change:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29185
Original comment by andrewha...@google.com
on 16 May 2014 at 11:46
Original issue reported on code.google.com by
andrewha...@google.com
on 15 May 2014 at 4:32