Community
Participate
Working Groups
I noticed that after closing the snapshot editor the SnapshotImpl instance is still kept in memory. Looking at the heap dump revealed that there is sometimes a QueryExecution$ExecutionJob still referenced by the eclipse ProgressManager. I'll attach a screenshot with the paths to the SnapshotImpl and will look into this problem.
Created attachment 168125 [details] Path keeping the SnapshotImpl alive This is the path keeping the SnapshotImpl alive. I noticed that sometimes the job stays displayed in the "Progress" view. If this happens then our instance of ExecutionJob keeps the Editor and other resources. To be on the safe side I will "cleanup" the job after it is executed. By cleanup I mean setting the problematic fields to null
I submitted the changes from comment 1. I'll keep the message open for a while to investigate why sometimes the jobs disappear and sometimes they are left in the list of the Process view.
The ClassReferrersQuery kept a reference to the ProgressListener it initially received and reused it afterwards on every tree expansion (i.e. every time the IResultTree.getChildren() method is called). This is wrong, as the job for which the progress listener was created is already finished and the listener has reported "done". I removed fully the usage of progress listener while expanding this tree. May be we should design our IResult subclasses like IResultTree to support progress information and pass a proper listener to them. However this will be an API change which I'm not sure we really need. With this small change I think the reported bug is solved. I close the message now.