Skip to content

How to return a String created in the code? #2693

Discussion options

You must be logged in to vote

No, that's perfectly correct. You cannot return a reference to something that heap allocated on the outgoing frame; that would be a dangling pointer.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SergioBenitez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants