[fpc-devel] smart pointers
Wayne Sherman
wsherman at gmail.com
Thu May 28 15:31:01 CEST 2026
On Thu, May 28, 2026 at 1:05 AM Martin Frb wrote:
> I was trying to find some definitive answers on how smart pointers
> (will) work.
> E.g. do smart pointers have a compiler controlled build in ref-counter
> like other managed types (strings/dyn-array).
> It seems not, but info I found is a bit conflicting.
https://wiki.freepascal.org/management_operators
"AddRef is called after the contents of a record have been duplicated
by a bitwise copy (for example after, not during, an assignment.)
By itself it does not do any lifetime management, but you can use it
to implement it."
More information about the fpc-devel
mailing list