[fpc-devel] Proof of Concept ARC implementation
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Oct 27 11:26:14 CET 2014
On 27 Oct 2014, at 11:10, Sven Barth wrote:
> A third possiblity would be to implement a cycle detector in the
> decrement helper, but I haven't come around that for now as I wanted
> to get a first rough implementation out to you all ;)
I think that a cycle detector should be an independent component, just
like heaptrc is an independent add-on to detect memory problems in
regular programs.
Additionally, as mentioned before, I still believe it's a very bad
idea to be able to inherited from a regular class and turn it into a
reference counted class. Reference counted and non-reference-counted
classes are different language entities with different behaviour and
different code generation requirements, and hence should be completely
unrelated.
Even if you completely forbid typecasting a reference counted class
into a non-reference-counted parent class, simply calling an inherited
method from a non-reference-counted parent class can easily completely
mess up the reference counting (e.g. suppose that inherited method
inserts "self" into a linked list).
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141027/07a1a098/attachment.html>
More information about the fpc-devel
mailing list