[fpc-pascal] Questions About Constructors
African Wild Dog
paintedlycaon at gmail.com
Fri Mar 31 19:26:54 CEST 2017
2017-03-30 4:25 GMT-03:00 Michael Van Canneyt <michael at freepascal.org>:
> On Thu, 30 Mar 2017, African Wild Dog wrote:
>> 1 - What happens if my constructor raise an exception? Is my destructor
>> automatically called?
>> 2 - Are the class fields automatically initialized to Default(T) just like
>> in Delphi?
> Yes. The're zeroed out when the memory for the class is allocated.
Thanks for the clarification.
I've issued # <http://bugs.freepascal.org/view.php?id=31619>0031619
<http://bugs.freepascal.org/view.php?id=31619> to add these details in the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal