[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Standard implementation of a stream that stores its data in memory
Source position: classesh.inc line 1058
type TMemoryStream = class(TCustomMemoryStream) |
||
public |
||
destructor Destroy; override; |
|
Frees any allocated memory and destroys the memory stream. |
procedure Clear; |
|
Zeroes the position, capacity and size of the stream. |
procedure LoadFromStream(); |
|
Loads the contents of a stream into memory. |
procedure LoadFromFile(); |
|
Loads the contents of a file into memory. |
procedure SetSize(); override; |
|
Sets the size for the memory stream. |
function Write(); override; |
|
Writes data to the stream's memory. |
end; |
|
Standard implementation of a stream that stores its data in memory |
|
| | ||
|
Abstract stream that stores its data in memory. |
|
| | ||
|
Base class for streams. |
|
| | ||
|
Base class of all classes. |
TMemoryStream is a TStream descendant that stores it's data in memory. It descends directly from TCustomMemoryStream and implements the necessary to allocate and de-allocate memory directly from the heap. It implements the Write method which is missing in TCustomMemoryStream.
TMemoryStream also introduces methods to load the contents of another stream or a file into the memory stream.
It is not necessary to do any memory management manually, as the stream will allocate or de-allocate memory as needed. When the stream is freed, all allocated memory will be freed as well.
|
Abstract stream that stores its data in memory. |
|
|
Base class for streams. |