Re: nsString
Igor Tandetnik <[email protected]> Mon, 05 Dec 2011 13:18:08 -0500
| Newsgroups | gmane.comp.mozilla.devel.embedding |
|---|---|
| Message-ID | <[email protected]> |
On 12/4/2011 9:23 PM, FrAnk Alvin wrote: > nsString attributeName > char* attrName = NS_ConvertUTF16toUTF8(attributeName).get(); This creates a temporary instance of NS_ConvertUTF16toUTF8. At the semicolon, this temporary is destroyed, deallocating the memory and leaving attrName a dangling reference. -- Igor Tandetnik