[CMake] Memory cleanup of variables

Bill Hoffman bill.hoffman at kitware.com
Tue Mar 10 20:06:26 EDT 2009


Naram Qashat wrote:
> I have a CMake project that I have been testing with various verisons of 
> CMake 2.4.x and 2.6.x to make sure it works as far back as 2.4.0, due to 
> not knowing what version of CMake our users will be using since a lot of 
> them use shells. In some instances, I have to read lines from a file 
> using a specific regular expression.  With CMake 2.6.x, this works fine 
> using the file(STRINGS) command.  With CMake 2.4.x, though (I haven't 
> checked what versions specifically), after reading in a lot of files, I 
> notice that a "memory exhausted" error comes up. I'm wondering when 
> CMake cleans up the memory it uses, and if there is a way around this 
> problem.  I would prefer not to force our uses to use CMake 2.6.x if 
> their shell provider won't provide them something newer.
> 
There may have been leaks in 2.4.X, not really much we can do about that 
now....   What does the your cmake code look like that causes the leak?


-Bill



More information about the CMake mailing list