<div dir="auto"><div class="gmail_extra" dir="auto"><div class="gmail_quote">Am 08.03.2018 08:33 schrieb "Maciej Izak" <<a href="mailto:hnb.code@gmail.com">hnb.code@gmail.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="quoted-text"><br></div><div class="quoted-text"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">No, this doesn't beg the question, because Object Pascal classes are designed in the principle to reduce on the heap. Changing this would not only mean quite some changes in the compiler/RTL with no real gain, but it would also change a core aspect of the Object Pascal language.</div></div></blockquote><div><br></div></div><div>classes with auto free has a lot of sense (without modifying classes design related to usage of heap), anyway old modes should stay untouched, and the new feature should have no negative influence on performance for RTL and Object Pascal. Because of legacy of all FPC modes the topic is a little complicated but IMO is possible to achieve (for such feature new mode should be introduced [<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">and maybe modeswitch</span>]).</div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I have no problem with adding a solution for automatic freeing (like ARC), my problem here was the stack vs. heap point. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_extra" dir="auto"></div></div>