[fpc-pascal] Re: Re: Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

Martin Schreiber mse00000 at gmail.com
Sat Oct 16 17:13:38 CEST 2010


Jonas Maebe wrote:

> 
> On 16 Oct 2010, at 15:46, Martin Schreiber wrote:
> 
>> 
>> Will it crash if it is empty as in TObject?
> 
> The contents of AfterConstruction don't matter. If the instance is freed
> before the constructor had a chance to call AfterConstruction, the self
> pointer won't be valid anymore in the constructor and hence the call to
> AfterConstruction may crash.
> 
What are the conditions that it crashes if "self" is not used in
AfterConstruction? Is there hidden code beside of AfterConstruction after
Create() which uses "self"? As written before it does not crash in
tmsethread which does not inherit from FPC TThread.

Martin




More information about the fpc-pascal mailing list