During the development of Real Studio 2011r1, we spent some time analyzing the compiler's memory usage. What we noticed was that the compiler was leaking memory. A memory leak occurs when code uses memory but then does not release this memory when it’s finished with it. The result is that the amount of memory the application uses continues to increase until the user quits the application or the application uses up all available memory and crashes.
During the development of 2011r1 we fixed every memory leak in the compiler. In fact, we went beyond that and fixed every leak we could find in the IDE. We fixed leaks in some framework classes as well such as:
As you may know, the Real Studio IDE is created with Real Studio and the Realbasic language. We create it in the same way you create your projects. The chart below compares running the Real Studio IDE project in 2010r5.1 (blue) versus 2011r1(green). All tests were performed by running the project in the debugger and then closing the project. Incremental compilation was disabled.
You can see that after five runs of the project, Real Studio 2010r5.1 leaked over 45 megabytes of memory. Compare that to Real Studio 2011r1 (green) where after five runs, not a single extra byte of memory was leaked.
This is a huge improvement in the performance of the IDE. Before 2011r1, if you were using the IDE for long periods of time, you probably found that it would slow down to the point where you had to restart it. By doing this you were releasing the memory that had not been released by the IDE. This is no longer an issue in 2011r1 which means you can now run the IDE for very long periods of time without having to restart due to memory leaks.
While we believe we have found every leak in the IDE, it is possible there are others and there are certainly leaks that remain in some framework classes. Should you believe you have found a memory leak, create a simple sample project and include it with a new case in our Feedback system.