Allocating static buffer in processing loop
Posted on 2003-11-21
Are there any pitfalls to allocating memory in a processing loop. I am not a fan of this concept, but is there a problem doing this? Exactly what is occuring by doing this? What will be gained, or lost by allocating outside the loop and clearing the beffer before each use?
for(ll->rewind(); ll->data() ; (*ll)++ )
sprintf(temp, (char *)" %s", (char *)ll->data());