[fpc-devel] RIP NoGlobals

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


On 30 Sep 2010, at 19:21, Hans-Peter Diettrich wrote:

> Jonas Maebe schrieb:
> 
>>>> 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 compiler.
> 
> IMO you simply don't understand the reason for my NoGlobals refactoring

I indeed probably don't, and certainly not in this context. Especially because the memory leaks above are virtually all caused by *local* variables that are not cleaned up properly in case of an error, while on the contrary most if not all global variables are destroyed/freed under all circumstances.


Jonas




More information about the fpc-devel mailing list