[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TRasterImage.EndUpdate

EndUpdate - finishes the update process.

## Declaration

Source position: graphics.pp line 1309

`public procedure TRasterImage.EndUpdate(`
`AStreamIsValid: Boolean = False`
`);`

## Arguments

`AStreamIsValid` |  | Indicates if the save stream for a shared image is valid.

## Description

EndUpdate finishes an update process.

EndUpdate maintains the value in the internal counter used to track active update processes started by calling BeginUpdate. It decrements the counter when it has a non-zero value, and exits immediately.

An EInvalidGraphicOperation exception is raised if the counter is already at 0 (zero) when EndUpdate is called.

When a full update was requested (loading image data), the device context for the Canvas and an allocated BitmapHandle are freed.

AStreamIsValid indicates if the save stream for the shared image is valid. When set to False, the save stream is freed. Any operation that modifies the save stream for the shared image should be performed within bracketed BeginUpdate / EndUpdate calls.

EndUpdate calls Changed to set the value in Modified and to signal the OnChange event handler (when assigned).

## Errors

Raises an EInvalidGraphicOperation exception with the message in rsRasterImageEndUpdate if the counter is already at 0 (zero) when EndUpdate is called.