senyor / generate-tostring

Automatically exported from code.google.com/p/generate-tostring
0 stars 0 forks source link

Memory Leak in GenerateToStringContext #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Its static variables hold references to various IDEA components (Project, 
Editor, PSI instances) over the whole lifetime of the application. This 
unnecessarily increases memory consumption when closing/reopening IDEA 
projects. 

I'm not sure when these refs get cleared/overwritten - probably only when 
the ToString-Action is invoked.

Such references should not be statically held anywhere, or at the very 
least, WeakReferences should be used to avoid the leaks.

Sascha

Original issue reported on code.google.com by sascha.w...@googlemail.com on 22 Aug 2007 at 4:23

GoogleCodeExporter commented 8 years ago
Okay I'll try to sort it out

Original comment by claus.ib...@gmail.com on 6 Sep 2007 at 12:33

GoogleCodeExporter commented 8 years ago
I will try to see if I can find any listener to add so I can get notification 
when
the project is closed.

Original comment by claus.ib...@gmail.com on 15 Sep 2007 at 9:42

GoogleCodeExporter commented 8 years ago
Okay got it sorted now. Much better with a project listener. Reduced the usage 
of
static variables. When the project is closed the variables are disposed (set to 
null)

Original comment by claus.ib...@gmail.com on 15 Sep 2007 at 10:45

GoogleCodeExporter commented 8 years ago
Fixed in svn rev 21. (v4.0.3)

Original comment by claus.ib...@gmail.com on 15 Sep 2007 at 10:49