// build/flecha build examples/memory_tracking.fl -o /tmp/memory_tracking
// Returns 42. Ownership follows the allocation across calls and aliases.
unsafe (*u8, error) make_byte() {
unsafe void consume(*const u8 pointer) {
pointer, err := make_byte();
if err != none { return 1; }
i32 answer = (*alias) as i32;
// free(alias); would be a compile-time double-free error.
// *alias = 0; would be a compile-time use-after-free error.
// The deferred call captures this allocation before rebinding.
another, failure := new<u8>(1);
defer free(another); // Null is also a valid free argument.