This repository was archived by the owner on Nov 26, 2024. It is now read-only.
This repository was archived by the owner on Nov 26, 2024. It is now read-only.
[SPIKE] Try to figure out how to handle memory leaks #17
Open
Description
There are various places within our Swift library where we're not feeing memory used within Rust correctly or completely, which will cause memory leaks in an application which uses our library. Places we've found so far:
- The
Util.collectTo
method copies memory when converting from Rust vectors to Swift arrays. We should free the underlying memory after copying - When converting strings (
Util.rustStringToSwift
) from Rust to Swift, we're calling free methods on the underlying Rust types, but we aren't doing anything when we move data from Swift into Rust (Util.rustStringToSwift
) which might also need work to free - Look into this comment about strings going out of scope when passing them to Rust.
Metadata
Metadata
Assignees
Labels
No labels