You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement deallocation for fixed-length lists with heap elements
Fixed two bugs in the core ABI for FixedLengthList types:
1. `deallocate` was `todo!()`, causing a panic when flat deallocation
was needed (e.g. `list<own<resource>, 3>`). Now uses
`flat_for_each_record_type` to iterate element types.
2. `deallocate_indirect` was a silent no-op `=> {}`, leaking
heap-allocated elements (e.g. strings in `list<string, 3>`). Now
iterates each element's memory offset and deallocates it using
`deallocate_indirect_fields`.
Added both a codegen test (verifying `cabi_post_` functions are
generated) and a runtime test with allocation tracking (verifying
no memory leaks when passing/returning fixed-length lists of strings).
0 commit comments