// WARNING: wxMemoryInputStream will not free buf.
// There is a memory leak here.
str = new wxMemoryInputStream(buf, strlen(buf));
// WARNING: wxMemoryInputStream will not free buf.
// There is a memory leak here.
str = new wxMemoryInputStream(buf, strlen(buf));