getStringBuffer method
Gets a StringBuffer from the pool or creates a new one
Implementation
StringBuffer getStringBuffer() {
StringBuffer buffer;
if (_stringBufferPool.isNotEmpty) {
buffer = _stringBufferPool.removeFirst();
_stringBufferReuses++;
// Clear the buffer
buffer.clear();
} else {
buffer = StringBuffer();
_stringBufferAllocations++;
}
return buffer;
}