Widgets: Table: Removing rows from tables leaks memory
------------------------------------------------------

                 Key: XAP-545
                 URL: https://issues.apache.org/jira/browse/XAP-545
             Project: XAP
          Issue Type: Bug
          Components: Widgets: Table/Tree/TreeTable
            Reporter: Trevor Oldak


Run the following xal
<xal xmlns="http://openxal.org/ui"; xmlns:xal="http://openxal.org/ui";>
        
        <macro:macro id="addMultiRow" 
xmlns:macro="http://openxal.org/core/macro";>
                <xm:modifications xmlns:xm="http://openxal.org/core/xmodify";>
                        <xm:append select="//table">
                                <row>
                                        <cell text="New Cell 1"/>
                                        <cell text="New Cell 2"/>
                                        <cell text="New Cell 3"/>
                                </row>
                                <row>
                                        <cell text="New Cell 4"/>
                                        <cell text="New Cell 5"/>
                                        <cell text="New Cell 6"/>
                                </row>
                        </xm:append>
                </xm:modifications>
        </macro:macro>

        <macro:macro id="removeRows" 
xmlns:macro="http://openxal.org/core/macro";>
                <xm:modifications xmlns:xm="http://openxal.org/core/xmodify";>
                        <xm:remove-element select="//row"/>
                </xm:modifications>
        </macro:macro>




                                <freePane width="500px" height="300px" 
id="testComponentFreePane">
                                        <table x="100px" y="0px">
                                                <column>
                                                        <header text="r:Column 
1"/>
                                                </column>
                                                <column  
horizontalAlignment="right" width="80px">
                                                        <header text="c:Column 
2"/>
                                                </column>
                                                <column id="column3">
                                                        <header text="d:Column 
3"/>
                                                </column>                       
                                                <row>
                                                        <cell text="x"/>
                                                        <cell text="y"/>
                                                        <cell text="z"/>
                                                </row>
                                                <row>
                                                        <cell 
text="aaaaaaaaaaaaaaaaaa"/>
                                                        <cell text="c:bbbbbb" 
horizontalAlignment="center" />
                                                        <cell text="ccccc"/>
                                                </row>
                                        </table>
                                        <button text="add" 
onCommand="macro:addMultiRow.execute()" x="0px" y="0px"/>
                                    <button text="remove" 
onCommand="macro:removeRows.execute()" x="0px" y="30px"/>
                                </freePane>
</xal>

Click 'remove' to remove rows from the table, 'add' to add rows. One would 
expect that each addition/removal cycle would leave the table with the same 
number of nodes in use. However, removal doesn't just not free up nodes, but it 
uses two more nodes each time it is run.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to