Do I have to free params sent to mgr.dispatch ?

Given the following sample:

RecordVal* r = new RecordVal(dns_telemetry_qname_stats); r->Assign(0, new Val(ts, TYPE_DOUBLE));

r->Assign(1, new StringVal(key));

r->Assign(2, new Val(qname_v->zone_id, TYPE_COUNT));

r->Assign(3, new Val(qname_v->cust_id, TYPE_COUNT));

r->Assign(4, new Val(qname_v->cnt, TYPE_COUNT));

r->Assign(5, new StringVal(sts));

val_list* vl = new val_list;


mgr.Dispatch(new Event(dns_telemetry_qname_info, vl), true);

Does Dispatch delete these resources ?

It should. Dispatch() will call all event handlers immediately. QueueEvent() is commonly used in most places in the code, and will dispatch it at a later time. You can also check if “dns_telemetry_qname_info” evaluates to true before creating the argument list — i.e. if no event handler is defined, you don’t need to create arguments for it.

- Jon