[ http://jira.springframework.org/browse/RCP-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Hoskens closed RCP-97.
--------------------------
Assignee: Jan Hoskens
Resolution: Fixed
Fix Version/s: 1.0.0
Removed Blank FaceDescriptor, more details in svn commit:
http://spring-rich-c.svn.sourceforge.net/spring-rich-c/?rev=1880&view=rev
> Creating ActionCommands without a CommandFaceDescriptor causes memory leaks
> ---------------------------------------------------------------------------
>
> Key: RCP-97
> URL: http://jira.springframework.org/browse/RCP-97
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Reporter: Calvin Yu
> Assignee: Jan Hoskens
> Fix For: 1.0.0
>
> Attachments: CommandFaceButtonManager.patch
>
>
> If no CommandFaceDescriptor is specified, then CommandFaceDescriptor.BLANK_FACE_DESCRIPTOR. The ActionCommand's CommandFaceButtonManager then calls addPropertyChangeListener() on this descriptor, adding itself as the listener. Unless another CommandFaceDescriptor is set for that ActionCommand, the CommandFaceButtonManager will never be removed from BLANK_FACE_DESCRIPTOR, and therefore the manager and command will never be garbage collected since the descriptor is a static.
> Possible solutions:
> 1) Remove AbstractPropertyChangePublisher's final modifiers on the addPropertyChangeListener() methods, so that they can be overriden by BLANK_FACE_DESCRIPTOR to be a no-op.
> 2) Create a new blank CommandFaceDescriptor instead of using a constant.
> 3) Modify CommandFaceButtonManager so that it isn't added as a PropertyChangeListener if the descriptor is BLANK_FACE_DESCRIPTOR.
> I've attached a patch to solution #3. While I believe #3 isn't the most optimal solution, it does have less potential side effects to solutions #1 and #2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|