fix: one-time memleak in example code