Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Bug persistance model Part
Bug persistance model Part [message #766207] Thu, 15 December 2011 11:11 Go to next message
etudes-developpements is currently offline etudes-developpementsFriend
Messages: 8
Registered: July 2011
Junior Member
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 #766827 is a reply to message #766207] Fri, 16 December 2011 13:53 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Do you mean your MPart implemented is hidden and @PreDestroy is called, but the topic keeps firing into it?

PW


Re: Bug persistance model Part [message #766855 is a reply to message #766827] Fri, 16 December 2011 14:54 Go to previous messageGo to next message
etudes-developpements is currently offline etudes-developpementsFriend
Messages: 8
Registered: July 2011
Junior Member
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?
Re: Bug persistance model Part [message #766981 is a reply to message #766855] Fri, 16 December 2011 19:36 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

No, there's no workaround as we haven't seen that problem. Please open a bug with a description (and some example code) at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI

PW


Previous Topic:Create dropdown menu in toolbar
Next Topic:Branding not working
Goto Forum:
  


Current Time: Mon Dec 22 03:35:43 GMT 2014

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

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