Disposing custom celltypes

Posted by: c12008 on 8 September 2017, 3:16 pm EST

  • Posted 8 September 2017, 3:16 pm EST

    Hi all,

    we are using "Spread for Windows Forms" version 6.0.3503.2008. And we use this with several custom celltypes mostly based on standard celltypes. Some of these custom celltypes internally load user controls and subscribes events.
    As our spread is created, resetted and re-created often during application runtime using many of our custom celltype we found out that the User Objects of our application process (checked with Windows Task Manager) increases very fast.
    However, we reset our spread during application runtime by using ActiveSheet.Rows.Clear() and then re-add new row.
    But the reset does not dispose the used custom celltypes instances so that the User Objects are not destroyed during the reset process. So we run in a very short time into a situation that the maximum number of User Objects is allocated and our system hangs.

    My question now is:

    What do we have to do/implement to make the spread dispose our custom cell types when we clear the rows (or just remove some rows and want the used custom cell types to be destroyed too).

  • Marked as Answer

    Replied 8 September 2017, 3:16 pm EST

    Hello C12008,

    I would like you to know that the Custom CellType won't be disposed just by clearing the rows. The custom CellType are different objects which are assigned to a cell/column in the Spread, and hence you would need to explicitly dispose the objects of the custom CellType by keeping an account of the custom CellType which were set for the row that is just cleared and then dispose those custom CellTypes.

    Hope that clarifies.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels