Skip to content
Prev 17389 / 63421 Next

wchar and wstring. (followup question)

On Mon, 29 Aug 2005, James Bullard wrote:

            
Yes, nkString copies the information (via mkChar) and the Free is needed.
The source is in gram.c.

Whenever you call Calloc you need to call Free or you will have a memory 
leak.
Nope, it creates an element of a character vector.  The point was that it 
was more natural to use character vectors than lists of single-element 
character vectors.
Well, we STRING etc are macros not types, but if you want a list of mixed 
types for use at R-level, SET_VECTOR_ELT is fine.
preferred to wctomb.  Please re-read what I wrote, and the relevant man 
pages.