Skip to content
This repository has been 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
ernieturner opened this issue Apr 29, 2020 · 0 comments
Open

[SPIKE] Try to figure out how to handle memory leaks #17

ernieturner opened this issue Apr 29, 2020 · 0 comments

Comments

@ernieturner
Copy link
Contributor

ernieturner commented Apr 29, 2020

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.
@clintfred clintfred changed the title Figure out how to handle memory leaks [SPIKE] Try to figure out how to handle memory leaks May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant