Changeset 12611


Ignore:
Timestamp:
2006-08-30T15:12:37+12:00 (18 years ago)
Author:
kjdon
Message:

need to delete the char * returned by MyGetCStr, otherwise we run out of memory or something :-(

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/UCArray.cpp

    r12234 r12611  
    6060  return cstr;
    6161}
     62
     63/** char * returned becomes the responsibility of the caller */
    6264unsigned char * MyGetCStr(const UCArray& text) {
    6365
     
    259261  utf8_word_to_unicode (a2_str, a2_out, 255);
    260262
     263  delete []a1_str;
     264  delete []a2_str;
     265
    261266  int l1 = a1_out[0];
    262267  int l2 = a2_out[0];
     
    340345  utf8_word_to_unicode (a2_str, a2_out, 255);
    341346
     347  delete []a1_str;
     348  delete []a2_str;
     349
    342350  unsigned int len = a2_out[0];; 
    343351  for (int i=1; i<=len; ++i) {
Note: See TracChangeset for help on using the changeset viewer.