This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 52205 - Possible Memory Leak
Summary: Possible Memory Leak
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-12-08 14:11 UTC by gwwsoftware
Modified: 2005-01-13 01:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gwwsoftware 2004-12-08 14:11:59 UTC
Every time I run an ant build my memory usage 
goes up significantly (4MB) and does not come 
back down or level off. My build script has 
quite a few jar files in its class path and at 
times will also call xdoclet but it seems to go 
up regardless of the target that is called.

Eventually I have to close and restart Netbeans 
IDE to recover the memory. I observed a few 
builds from the task manager in windows and the 
memory went from 100,000K to 116,000K in 
increments of 4,000K for each build of the same 
target that does a clean, compile, create jar 
and create war.

Due to the size of the memory lost each time I 
suspect it is related to the loading of my 
classpath.
Comment 1 Petr Nejedly 2004-12-09 09:41:59 UTC
Which NB build and which JDK?
What ant extensions are you using?

Please try enabling a memory toolbar (right click in toolbars area and
check Memory) and track heap usage (if you click on the graph, it does
a System.gc).

We have had several "class leaks" before caused by some Ant or JDK
problems, but all known so far are fixed/worked around. If this is
another case of such leak, we'll need more cooperation to catch it.

For beginning, you can try running the IDE with -J-verbose:class,
it will log all loaded classes and will also log class unloading.
After one initial ant build, all classes loaded during subsequent ant
builds should be unloaded during GC some time after the build finishes.
Comment 2 Antonin Nebuzelsky 2005-01-12 10:25:19 UTC
Jesse, feel free to close this issue if you don't have enough info.
Comment 3 Jesse Glick 2005-01-13 01:45:39 UTC
Right.