[fpc-devel] Advanced objects
Kostas Michalopoulos
badsectoracula at gmail.com
Fri Jul 24 01:07:00 CEST 2020
There should be at least support for operators. I have a custom
dynamic array object type (i use objects instead of classes to avoid
unnecessary heap allocations) which would benefit a lot from such
support. I worked around not having management operators by putting
the data fields and core functionality inside a generic advanced
record which implements these operators and then using that inside the
object (so the values do get released automatically when the object
itself is released), but i also need support for at least the equality
operator as the dynamic array object has an IndexOf method that uses
that and it cannot be used with other dynamic arrays (so i cannot have
a dynamic array object which itself contains dynamic array objects
because i cannot provide a = operator for the dynamic array object
itself).
More information about the fpc-devel
mailing list