Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Memory leak in uml2 ?
Memory leak in uml2 ? [message #627268] Sun, 07 December 2008 20:24
Alexander Weickmann is currently offline Alexander WeickmannFriend
Messages: 33
Registered: July 2009
Member
Hi there.

I've been programming the last five month on a model merge from the model
of our software to the uml2 format.

A few days ago I first noticed a memory leak in my plugin. I did not see
it earlier because everything went well so far because I had enough
memory. But now I have 300 JUnit tests and at about test 250 my system
gets very slow. So I looked into the system control and my memory was
absolutely full.

Then I tried my program itself and started the uml export. Depending on
the size of the model I get 5 to 10 megabyte memory that is allocated and
not beeing freed after the operation.

After killing a full day with trying to get eclipse tptp working (it is
totally bugged) I tried JProbe. I've gone trough the JProbe tutorials and
stuff and after another day now I know how to use that ^ ^

So I did the following:

- Start my plugin in eclipse (Eclipse application run)
- Connect JProbe to the current session
- As the eclipse was loaded with my plugin I started a use case in JProbe
which means from now on data will be collected
- Execute my uml2 export
- Finish the JProbe use case and shutting down everything.

Then JProbe saves me a snapshot which lets me investigate every instance
that has been allocated. I get a list with many hundreds of classes. I
first looked to my own classes, that from my plugin. Everything seems to
be ok there though. There are 0 instances in the memory except the action
which I suppose is left in the memory by eclipse. So I think that's ok.

Then I filtered for all instances org.eclipse.uml2.*

From org.eclipse.uml2.uml.internal.impl.StereotypeImpl there are 2376
instances in the memory and 0 dead. That means not a single one of these
2376 instances has been killed by garbage collection and is still in
memory after the operation. I can also take a look to the referers of
these objects. None of my classes is there, but for example
org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapte rList still
refers to StereotypeImpls

I also have in memory after the operation:
1878 GeneralizationImpl (and 0 killed)
1665 Property[] (and 6 killed)
1622 ClassImpl (and 528 killed)
1584 ElementImportImpl (and 0 killed)

the list goes on ...

Now I'm really confused what to do? Can the problem be on my side? That I
don't free anything properly? But only my action delegate is in memory
after the operation. But the action is not listed in the referers to the
in memory objects mentioned above and it does not have any member
variables of these ... What can I do now?
Previous Topic:Instances for StateMachine::Trigger
Next Topic:Change ID of element
Goto Forum:
  


Current Time: Tue Mar 31 08:21:15 GMT 2020

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top