[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lifetime of strings
- From: erik@... (Erik Hougaard)
- Date: Mon, 4 Sep 2000 11:09:46 +0200
----- Original Message -----
> What is the lifetime of the string passed to dosomething()? Will it
> eventually be garbage-collected sometime after dosomething() has
> returned? So, would dosomething() have to make a copy of the string?
It only lives in your function - So yes you must make a copy and store it
somewhere safe :-)
/Erik