Is Vec<&str> safe
I'm trying to avoid copying strings, and i'm wondering if Vec<&str> is safe. What happens if the String that &str is referencing goes out of scope? Will the memory for the String stay or will it be pointing to invalid memory?
I'm trying to avoid copying strings, and i'm wondering if Vec<&str> is safe. What happens if the String that &str is referencing goes out of scope? Will the memory for the String stay or will it be pointing to invalid memory?