[fpc-devel] Initialize/Finalize management operators and Default intrinsic

Maciej Izak hnb.code at gmail.com
Tue Apr 12 08:57:37 CEST 2016


2016-04-11 23:36 GMT+02:00 Sven Barth <pascaldragon at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160412/8a570645/attachment.html>


More information about the fpc-devel mailing list