iTextSharp.text.pdf.hyphenation.ByteVector.TrimToSize C# (CSharp) Method

TrimToSize() public method

public TrimToSize ( ) : void
return void
		public void TrimToSize() {
			if (n < arr.Length) {
				byte[] aux = new byte[n];
				Array.Copy(arr, 0, aux, 0, n);
				arr = aux;
			}
		}
	}

Usage Example

Exemplo n.º 1
0
        public void LoadSimplePatterns(Stream stream) {
            SimplePatternParser pp = new SimplePatternParser();
            ivalues = new TernaryTree();

            pp.Parse(stream, this);

            // patterns/values should be now in the tree
            // let's optimize a bit
            TrimToSize();
            vspace.TrimToSize();
            classmap.TrimToSize();

            // get rid of the auxiliary map
            ivalues = null;
        }