<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 27 Oct 2014, at 11:10, Sven Barth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">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 ;)<br></span></span></blockquote></div><br><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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).</div><div><br></div><div><br></div><div>Jonas</div><div><br></div></body></html>