## Printer Device Driver

[prev][next][parent][TOC]

### GplDitherDeleteInstance

Description

This function must be called at the end of a document so that memory that was allocated in GplDitherCreateInstance can be freed.

Format

    APIRET APIENTRY GplDitherDeleteInstance( PHDITHER  pdh );

Parameter

pdh (PHDITHER) Pointer to the dither handler that was created by GplDitherCreateInstance.

Returns

Success NO_ERROR

Example Code

Following is an example of using GplDitherDeleteInstance:

    // Tell the dither function to deallocate all it's buffers

    GplDitherDeleteInstance( (HDITHER)pHandle->pdh );

    // Reminder:

    // Free all buffers our driver allocated on behalf of GENPLIB's dithering code

    // This includes error buffers for error-diffusion algorithms

    // as well as the destination buffers used for rendering