Ticket #212 (accepted Tasks)
Implement memory management for the object model
| Reported by: | octo | Owned by: | octo |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | LogicMail | Version: | |
| Keywords: | Cc: | adam.wos@… | |
| Blocked By: | Blocking: | #329 |
Description
The way LogicMail's object model is currently implemented, it is only likely to grow in size as the application remains running. This probably is insignificant when only used deliberately, but may become serious once #78, #79, and #211 are implemented.
Currently, all loaded data remains referenced from within the object model for the lifetime of the application. There are many ideas for how to implement a better approach, so I'll list some of them here:
- Learn about, and find ways to use, the WeakReference class for referencing message data
- Avoid maintaining references to message content unnecessarily:
- Attachments when a message is not currently being viewed (this data is kept in the file cache anyways)
- Any non-envelope message content when that message's mailbox is not being viewed
- Figure out the minimal amount of data necessary for background server polling to work, and make it possible to trim referenced header data back to that point
Change History
Note: See
TracTickets for help on using
tickets.
