[fpc-pascal] ppcjvm issues
Michael Schnell
mschnell at lumino.de
Thu Jan 12 10:08:52 CET 2017
On 11.01.2017 11:25, Sven Barth wrote:
>
> We're talking about JVM here where garbage collections *must* be used.
> So FPC does as well for that target.
>
This of course is true. But if the class code is in fpc, fpc paradigms
should be adhered, as well. and here the fpc code *can* e.g. explicitly
allocate stuff that needs to be freed later, or e.g. can open a
connection to whatever that needs to be closed later, and so (if not
using ref counted objects) with such classes destroy() needs to be
called (via the free() chain).
Regarding this, IMHO it would be good practice to always provide destroy
and free, and if it's empty it does not harm to call it.
-Michael
More information about the fpc-pascal
mailing list