// build/flecha build examples/raw_allocation.fl -o /tmp/raw_allocation
// Returns 42. Heap allocations need explicit or deferred free.
Box Box::init(i32 value, string label) override {
return build Box { self.value = value; self.label = label; };
i32 Box::valueOf(&const self) {
(*Box box, error err) = new<Box>(Box::init(42, "heap object"));
if err != none { return 1; }
defer free(box); // Releases the owned label, then the Box storage.
(byte, byteError) := new<u8>(none);
if byteError == AllocationError.OutOfMemory { return 2; }
free(byte); // Null is a no-op.