[fpc-pascal] Problem with objects

Santiago A. svaa at ciberpiula.net
Wed Dec 23 17:15:30 CET 2015


El 23/12/2015 a las 16:49, Dennis Poon escribió:
>
>
> Even if it is an object, you can still define a constructor.
> A constructor should initialize the memory area of the object to 0,
> even if you don't explicitly assign List := nil;
> It is safer to call this constructor before you handle the List.
Well, AFAIK, according with the documentation, the constructor of an
object is only necessary if it has virtual methods. It looks that
calling a constructor that does nothing is a workaround solves the problem.

But it doesn't make me feel secure.

-- 
Saludos

Santi
svaa at ciberpiula.net




More information about the fpc-pascal mailing list