diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-04 15:57:51 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-04-06 15:44:50 -0600 |
commit | 466ce3aea9cec006b8b0e348c9021ac2c8106022 (patch) | |
tree | 0ba80035ebe24c771e5e40b38cf2495b15d4e245 /gdb/utils.h | |
parent | 062d818d2535d4bc9ccd5dbf3c6702b9f3e763cc (diff) | |
download | binutils-466ce3aea9cec006b8b0e348c9021ac2c8106022.zip binutils-466ce3aea9cec006b8b0e348c9021ac2c8106022.tar.gz binutils-466ce3aea9cec006b8b0e348c9021ac2c8106022.tar.bz2 |
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.
Diffstat (limited to 'gdb/utils.h')
0 files changed, 0 insertions, 0 deletions