| 303 | } |
| 304 | |
| 305 | struct htable *memleak_start(const tal_t *ctx) |
| 306 | { |
| 307 | struct htable *memtable = tal(ctx, struct htable); |
| 308 | htable_init(memtable, hash_ptr, NULL); |
| 309 | |
| 310 | if (memleak_track) { |
| 311 | /* First, add all pointers off NULL to table. */ |
| 312 | children_into_htable(memtable, NULL); |
| 313 | |
| 314 | /* Iterate and call helpers to eliminate hard-to-get references. */ |
| 315 | call_memleak_helpers(memtable, NULL); |
| 316 | } |
| 317 | |
| 318 | tal_add_destructor(memtable, htable_clear); |
| 319 | return memtable; |
| 320 | } |
| 321 | |
| 322 | void memleak_init(void) |
| 323 | { |
no test coverage detected