"If you are trying to find a word, I understand the offset thing where it is incrementing the point from the start of the word you want, yeah? So you make a word equal a point in the input string, but what you actually stored is the whole string from a certain point, so it's not actually a word?"
Yes, that's exactly it. It's difficult to explain, and sometimes I'm not sure to understand it completely myself
There is no real memory leak, since it's always the same dictionary which is used again and again : it's the bot's "input_words" dictionary. When the first replies come, the dictionary is empty, so the words in it get mallocated(). THEN, as other replies come to the chat window, the words that were mallocated() get reallocated() and the other words that were NOT mallocated() yet are allocated. All this stuff is freed when the bot disconnects, and only there (at least it's so in the RACC template #2).
They may be memory leaks elsewhere, but this is not one of them. How did you do to notice that memory was leaking ?