LaunchConfigurationDelegates in Eclipse remain in memory after their launch method has executed. As such, they also prevent any object they reference from being garbage-collected. For example in the following code
class MyLaunchConfigurationDelegate extends LaunchConfigurationDelegate { protected BigObject bigObject = null; public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor progressMonitor) throws CoreException { this.bigObject = createBigObject(); } }
bigObject will remain in memory for ever, so it’s worth keeping this in mind and cleaning up before returning from launch().