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

# TSharedIcon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TSharedIcon - a reference counted shared Icon

## Declaration

Source position: graphics.pp line 1520

`type TSharedIcon = class(TSharedRasterImage)`
`protected`
`procedure FreeHandle; override;` |  | Release the handle for this image and free its resources
`procedure UpdateFromHandle(); virtual;`
`function IsEmpty; override;` |  | IsEmpty - checks if there is actually an image at the reference, and returns True if there is not
`public`
`constructor Create; override;` |  | Create - constructor for TSharedIcon: performs inherited Create then creates a list of images
`destructor Destroy; override;` |  | Destroy - destructor for TSharedIcon: frees the list of images and performs inherited Destroy
`procedure Clear;` |  | Clear - remove the icon and free its resources
`procedure Delete();` |  | Delete - remove the icon with specified index
`function GetIndex();` |  | GetIndex - returns the Index of an image with specified pixel format, height and width
`public`
`class function GetImagesClass; virtual;` |  | GetImagesClass - finds which class of icon images is being referenced
`public`
`procedure Add();` |  | Add a reference to the shared icon
`function Count;` |  | Count - returns the number of references to the shared icon
`end;`

## Inheritance

`TSharedIcon` |  | TSharedIcon - a reference counted shared Icon
`TSharedRasterImage` |  | TSharedRasterImage - a reference counted raster image (may be shared between several controls)
`TSharedImage` |  | TSharedImage - base class for reference counted images
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net.