Opened 14 years ago
Closed 12 years ago
#1437 closed defect (duplicate)
Memory leak in java webtier
Reported by: | andymorf | Owned by: | trevorwekel |
---|---|---|---|
Priority: | high | Milestone: | 2.2 |
Component: | Web API | Version: | 2.2.0 |
Severity: | critical | Keywords: | java webtier |
Cc: | External ID: |
Description
After every call to a servlet using Java- WebApi the memory consumption of javaw.exe (tomcat) is increasing even after GC. A memory profiler on javaw shows that almost all the MgXXX objects remain in memory.
Discussion on internals mailing list leads to following solution:
Update line 2003 in /trunk/Oem/SWIGEx/Source/Modules/java.cxx with the following:
Replaceall(tm, "new $javaclassname(cPtr, $owner)", "($javaclassname)ObjectFactory.createObject($module.getClassId(cPtr), cPtr, true)");
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | testmem.jsp added |
---|
comment:1 by , 14 years ago
Owner: | set to |
---|
Does the attached testmem.jsp script show the leak? It should run if dumped in www/mapviewerjava and accessed using http://server/mapguide/mapviewerjava/testmem.jsp.
If it does not show the leak, can you provide a different test script which does?
Also, which platform are you running (Windows, Linux, 32bit, 64bit...)?
comment:2 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #1960, which has been fixed
Memory leak test script