If you have Models or Components as fields in you classes you should override
the classes method onDetach.
Example:
Public class MyPanel extends Panel {
private final IModel<Object> objectModel;
public MyPanel(String id, IModel<Object> objectModel) {
super(id,objectModel);
this.objectModel = objectModel;
}
@Override
protected void onDetach() {
super.onDetach();
objectModel.detach();
}
}
Marvin Richter
-----Original Message-----
From: Maxim Solodovnik [mailto:[email protected]]
Sent: Thursday, February 06, 2014 1:09 PM
To: [email protected]
Subject: Memory leaks best practices
Hello All,
Recently we have deployed our project to wicket project to production server.
And start getting OutOfMemory PermGenSpace.
I believe we have memory leak in our application maybe there is best practices
how to deal with Models and JPA entities to resolve this?
Thanks in advance
--
WBR
Maxim aka solomax