[fpc-devel] RIP NoGlobals

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Sep 30 14:22:20 CEST 2010

On 30 Sep 2010, at 14:15, Mattias Gärtner wrote:

> Zitat von Jonas Maebe <jonas.maebe at elis.ugent.be>:
>> On 30 Sep 2010, at 13:32, Mattias Gärtner wrote:
>>> Ehm, are you saying, that the compiler must be restarted when  
>>> there were errors, because it does not clean up properly?
>> As far as allocated memory is concerned: yes. It does free a bunch  
>> of stuff when an error occurs, but not everything, and what is not  
>> freed depends on the error.
> Ok. Thanks.
> And I guess there are currently no plans to fix this, right?

No, because it would be lots of work (writing test programs that  
trigger all possible error conditions and testing/debugging them one  
by one, or implementing some kind of mark/release system) with no real  
payoff except if you're an IDE developer that wants to integrate the  

Solving memory leaks that occur during a successful compilation is  
both easier (you have to compile less different programs to obtain  
large code coverage) and more important to everyone (memory leaks  
during a successful compilation can needlessly increase the memory  
requirements of the compiler).

> So the proper way to integrate FPC is to run it as separate process  
> or in a dyn lib with its own memory manager. Correct, or ?
> This means, in order to share some caches an IDE must use some IPC/ 
> shared memory. Right?

Probably, I haven't really thought about that.


More information about the fpc-devel mailing list