[binutils-gdb] Use new and delete for values
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Fri Apr 6 23:57:00 GMT 2018
*** TEST RESULTS FOR COMMIT 466ce3aea9cec006b8b0e348c9021ac2c8106022 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 466ce3aea9cec006b8b0e348c9021ac2c8106022
Use new and delete for values
This adds a constructor and destructor to struct value, and then
changes value.c to use "new" and "delete".
While doing this I noticed a memory leak -- value_decref was not
freeing value::optimized_out. This patch fixes this leak.
gdb/ChangeLog
2018-04-06 Tom Tromey <tom@tromey.com>
* value.c (struct value): Add constructor, destructor, and member
initializers.
(allocate_value_lazy, value_decref): Update.
More information about the Gdb-testers
mailing list