myGrid

Switching from Design perspective does not do detachFromModel().

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5
  • Component/s: Taverna GUI
  • Labels:
    None

Description

When I am in the Design perspective and click on any other perspective I get:
WARN 2006-12-05 15:18:29,404 (org.embl.ebi.escience.scuflui.ScuflSVGDiagram:162) - Did not detachFromModel() before attachToModel()

This may cause memory leaks?!

Activity

Hide
Stuart Owen added a comment - 2006-12-05 16:30

This stems from the fact that when a new layout is configured, as the XML is parsed a new component is created (in ZBasePane.swap). This means that when it is a ZRavenComponent and setComponent is called, the old content is no longer there (i.e null) so deregisterComponent is not called, so it is not detached.

Show
Stuart Owen added a comment - 2006-12-05 16:30 This stems from the fact that when a new layout is configured, as the XML is parsed a new component is created (in ZBasePane.swap). This means that when it is a ZRavenComponent and setComponent is called, the old content is no longer there (i.e null) so deregisterComponent is not called, so it is not detached.
Hide
Stuart Owen added a comment - 2006-12-05 16:45

Sorry, the new component is not made in swap, but is made in ZBasePane.configure, just before calling swap to remove the old component and replace it with the new. In the case of the Design perspective this creates a new SplitPane, and the old one is discarded without deregisterComponent, and therefore detachModel, being called on its internal ZComponent elements.

Show
Stuart Owen added a comment - 2006-12-05 16:45 Sorry, the new component is not made in swap, but is made in ZBasePane.configure, just before calling swap to remove the old component and replace it with the new. In the case of the Design perspective this creates a new SplitPane, and the old one is discarded without deregisterComponent, and therefore detachModel, being called on its internal ZComponent elements.
Hide
Stuart Owen added a comment - 2006-12-06 15:52

Resolved by adding 'discard' method to ZTreeNode. This is used to indicate that a node, Zaria component, is about to be discarded giving it the oppurtunity to do any cleaning up - specifically in the case of ZRavenComponent which now calls deregisterComponent which leads to a detachFromModel.

Show
Stuart Owen added a comment - 2006-12-06 15:52 Resolved by adding 'discard' method to ZTreeNode. This is used to indicate that a node, Zaria component, is about to be discarded giving it the oppurtunity to do any cleaning up - specifically in the case of ZRavenComponent which now calls deregisterComponent which leads to a detachFromModel.

People

Vote (0)
Watch (0)

Dates

  • Created:
    2006-12-05 15:21
    Updated:
    2006-12-06 15:52
    Resolved:
    2006-12-06 15:52