chain one wrote:
As what I read in antlr3string.c:

 static pANTLR3_STRING
subString8   (pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex)
{
    pANTLR3_STRING newStr;

    if (endIndex > string->len)
    {
endIndex = string->len + 1;
    }
    newStr  = string->factory->newPtr(string->factory, string->chars + startIndex, endIndex - startIndex);

    return newStr;
}


Does it mean every time subString8 is called, one string will be created and then the ptr of string is returned?
If so, I am  wondering if I should delete the strings created by calling subString8 or other such kinds of string functions after using them.
Just reading the piece of code above, I guess I should manually delete these strings. Is that right?
 
No - any string created by a factory is tracked and released when you close the factory.

Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to