[fpc-pascal] ppcjvm issues

Jon Foster jon-lists at jfpossibilities.com
Thu Jan 12 03:05:42 CET 2017


On 01/11/2017 02:25 AM, Sven Barth wrote:
>
> Am 11.01.2017 08:54 schrieb "Michael Schnell" <mschnell at lumino.de 
> <mailto:mschnell at lumino.de>>:
> >
> > On 10.01.2017 05:13, Jon Foster wrote:
> >>
> >> On 01/07/2017 10:39 AM, leledumbo wrote:
> >>
> >> So that leaves me with the question: What about destructors? Must I 
> call free/destroy on all objects I create, or do they self-destruct? If 
> so destroy or free?
> >
> >
> > AFAIU, in fpc destroying any objects is mandatory. And this close to 
> always needs to be done with "Free" (which inside the class finally calls 
> Destroy).
> >
> > If destroying an object is not necessary, the class should provide a 
> dummy Free procedure. So the application programmer always can/should use 
> Free.
>
> We're talking about JVM here where garbage collections *must* be used. So 
> FPC does as well for that target.
>
It goes against soooo many years of working with Object Pascal... but I'll 
let the JVM destroy them.

Thanks!

-- 
Jon Foster
JF Possibilities, Inc.




More information about the fpc-pascal mailing list