6 * tal/autoptr - automatic updates of pointers to tal objects.
8 * This code updates pointers when the pointed-to object is freed.
10 * Maintainer: Rusty Russell <rusty@rustcorp.com.au>
13 * #include <ccan/tal/autoptr/autoptr.h>
20 * char *c = tal(NULL, char);
22 * // Sets p to point to c.
23 * autonull_set_ptr(NULL, &p, c);
26 * // Automatically clears p.
32 int main(int argc, char *argv[])
34 /* Expect exactly one argument */
38 if (strcmp(argv[1], "depends") == 0) {