2016-04-11 23:36 GMT+02:00 Sven Barth <pascaldra...@googlemail.com>: > I know this is a rather constructed example, but it's similar to the C++ > code we had at work, so it's code that can happen in the real world. > If we don't find a way to solve this problem then I'm afraid that I > won't include your changes in trunk, cause I don't want to open that can > of worms. >
Eeeee? I am a little shocked by your arguments because that kind of bug is possible since we have initialization/finalization section and uses section in interface/implementation section. *The programmer must be aware of*. The mentioned bugs are here a looong time. For example fixed by me for Lazarus: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&sortby=date&revision=49547 The reason of memory leak in mentioned rev was the same as presented by your example but in context of initialization/finalization. It was raised in Lazarus in random cases (installed packages combination). Pascal was never safe language because we have ASM, Pointers and other stuff. The pros is much more than cons for management operators (SmartPointer + Generics.Collections is awesome and big step forward). Management operators is powerfully syntax and I don't want to drop them because it is base for my next improvements. No one is forced to using management operators. You are killing the whole tree. It is like atom power. You can create nuclear weapon to kill, but you can use that power to build nuclear power plant. Seems like my existence here on mailing list and branches has no sense. I will drop my branches here and move my work to github. What is the sense working here if all work is rejected? My github branch will be often synchronized with core trunk. Anyway good luck and thanks for "maciej" branch! :) -- Best regards, Maciej Izak
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel