[Overview][Types][Classes][Index] | Reference for unit 'PropertyStorage' (#lcl)

# TCustomPropertyStorage.StorageNeeded

Ensures that the storage mechanism for the container is available.

## Declaration

Source position: propertystorage.pas line 149

`public procedure TCustomPropertyStorage.StorageNeeded(`
`ReadOnly: Boolean`
`); virtual;`

## Arguments

`ReadOnly` |  | True if write access is disabled for the property store. False if write access is allowed.

## Description

StorageNeeded is a method used to ensure that the underlying storage mechanism for the container has been allocated and configured. StorageNeeded has an empty implementation in TCustomPropertyStorage. It must be overridden in a descendent class to use the format and access mechanism needed.

The ReadOnly argument indicates whether write access is enabled for the storage. In general, the Save method requires write access and the Restore method does not.

## See also

TCustomPropertyStorage.FreeStorage |  | Frees resources allocated for the underlying storage mechanism.
TCustomPropertyStorage.Save |  | Saves all linked property collections.
TCustomPropertyStorage.Restore |  | Restores all linked property collections.