Changeset 12612 for trunk/indexers


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

need to delete the char * created by MyGetCStr otherwise we run out of memory or something

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mgpp/text/UCArray.cpp

    r12319 r12612  
    4646}
    4747
     48/** char * returned becomes the responsibility of the caller */
    4849char * GetCStr(const UCArray& text) {
    4950
     
    6061  return cstr;
    6162}
     63
     64/** char * returned becomes the responsibility of the caller */
    6265unsigned char * MyGetCStr(const UCArray& text) {
    6366
     
    259262  utf8_word_to_unicode (a2_str, a2_out, 255);
    260263
     264  delete []a1_str;
     265  delete []a2_str;
     266
    261267  int l1 = a1_out[0];
    262268  int l2 = a2_out[0];
     
    340346  utf8_word_to_unicode (a2_str, a2_out, 255);
    341347
     348  delete []a1_str;
     349  delete []a2_str;
     350
    342351  unsigned int len = a2_out[0];; 
    343352  for (int i=1; i<=len; ++i) {
Note: See TracChangeset for help on using the changeset viewer.