Bug persistance model Part [message #766207] |
Thu, 15 December 2011 11:11 |
Eclipse User |
|
|
|
When parts are created through the EPartService and when these parts register events initialized with @UIEventTopic, the references to these events are never removed when the parts are closed with the function partService.hidePart(LogView.ID, true);
Controleur.java
MPart part = partService.findPart(LogView.ID);
if (part == null) {
part = partService.createPart(LogView.ID);
}
if (part != null) {
part.setLabel("DBLogView");
part.setTooltip("Tooltip");
partService.showPart(part, PartState.CREATE);
}
PartTest.java
@Inject
public void onEventReceptionListeLocalites(
@Optional @UIEventTopic("com/test/mon/topic") String test) {
if(test!= null) {
// Ok
}
}
In the EventObjectSupplier file, the functions unsubscribe and/or dispose are never executed. The part still has in memory a reference to these events.
Otherwise, is there a means to remove the reference to an event declared with an EventTopic or UIEventTopic annotation?
|
|
|
|
Re: Bug persistance model Part [message #766855 is a reply to message #766827] |
Fri, 16 December 2011 14:54 |
Eclipse User |
|
|
|
Yes. The function with the @PreDestroy annotation is called and the topic is still firing into this MPart.
Witch seems to be a memory leak, right?
Is there a workaround to avoid this problem?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04310 seconds