{
av.removePropertyChangeListener(listener);
}
+ releaseReferences();
}
});
}
/**
+ * Ensure any potentially large object references are nulled
+ */
+ public void releaseReferences()
+ {
+ this.tree = null;
+ this.treeCanvas.tree = null;
+ this.treeCanvas.nodeHash = null;
+ this.treeCanvas.nameHash = null;
+ }
+
+ /**
* @return
*/
protected PropertyChangeListener addAlignmentListener()
if (sq != null)
{
// search dbrefs, features and annotation
- DBRefEntry[] refs = jalview.util.DBRefUtils
+ List<DBRefEntry> refs = jalview.util.DBRefUtils
.selectRefs(sq.getDBRefs(), new String[]
{ labelClass.toUpperCase() });
if (refs != null)
{
- for (int i = 0; i < refs.length; i++)
+ for (int i = 0, ni = refs.size(); i < ni; i++)
{
if (newname == null)
{
- newname = new String(refs[i].getAccessionId());
+ newname = new String(refs.get(i).getAccessionId());
}
else
{
- newname = newname + "; " + refs[i].getAccessionId();
+ newname += "; " + refs.get(i).getAccessionId();
}
}
}
/*
* put them together as <method> Using <model>
*/
- final String ttl = MessageManager.formatMessage("label.treecalc_title",
+ final String ttl = MessageManager.formatMessage("label.calc_title",
treecalcnm, smn);
return ttl;
}