Expr: use class IntrusivePtr

As a side effect, this fixes lots of memory leaks in
`*Expr::InitVal()` because in most implementations, the `aggr`
parameter leaks.
This commit is contained in:
Max Kellermann 2020-02-26 19:12:57 +01:00
parent 7be3641f1d
commit c3ea246237
17 changed files with 885 additions and 1206 deletions

View file

@ -10,6 +10,7 @@
#include <map>
#include <string>
template <class T> class IntrusivePtr;
class Val;
class Stmt;
@ -159,7 +160,7 @@ int dbg_handle_debug_input(); // read a line and then have it executed
int dbg_execute_command(const char* cmd);
// Interactive expression evaluation.
Val* dbg_eval_expr(const char* expr);
IntrusivePtr<Val> dbg_eval_expr(const char* expr);
// Extra debugging facilities.
// TODO: current connections, memory allocated, other internal data structures.