TwainFreeDIB

Frees a Device Independent Bitmap (DIB) that you no longer need.

Synopsis

error = TwainFreeDIB(Dib)

Args

Dib is the DIB returned by TwainCreateDIB.

Returns

An empty string if successfully freed, or an error code.

Notes

If you do not free your DIBs created with TwainCreateDIB, then when your main script ends, RxTwain automatically frees all of those DIBs. But, since a DIB can consume much memory, it is best to free it as soon as you no longer need it.

It is usually safe to pass a Dib handle that was never initialized by TwainCreateDIB, but TwainIsValidDIB can be used to verify.