private RecycleIntBlocks ( int blocks, int start, int end ) : void | ||
blocks | int | |
start | int | |
end | int | |
return | void |
internal void RecycleIntBlocks(int[][] blocks, int start, int end)
{
lock (this)
{
for (int i = start; i < end; i++)
{
freeIntBlocks.Add(blocks[i]);
blocks[i] = null;
}
}
}
public void Reset() { if (bufferUpto != -1) { if (bufferUpto > 0) { // Recycle all but the first buffer docWriter.RecycleIntBlocks(buffers, 1, 1 + bufferUpto); } // Reuse first buffer bufferUpto = 0; intUpto = 0; intOffset = 0; buffer = buffers[0]; } }