System.SysUtils.TMarshaller.UnsafeFixString
Delphi
function UnsafeFixString(const Str: string): TPtrWrapper;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TMarshaller |
Description
Returns a wrapped pointer referencing the data at the start of the string.
The UnsafeFixString method ensures the string has its reference count incremented. The returned value should be passed to UnfixString when finished with in order to avoid memory leaks. If the string data is modified through the returned pointer, all references to the shared string data will be affected.