| Summary: | Ensure collection properties are always created lazily. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | GEF MVC | Assignee: | Alexander Nyßen <nyssen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nyssen |
| Version: | 0.2.0 | ||
| Target Milestone: | 4.0.0 (Neon) M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Matthias Wienand
In addition we should think of wrapping the observable collections into some "MutingWrapper" (which prevents client listener registration and only accepts the listener of the property) before setting them on the property, so that no client can register listener's by mistake there. Also, internal code should only use the collection and the properties could thus be lazily created when accessed by clients only. This should reduce the memory footprint to one comparable before adopting JavaFX properties (while there, even the collection themselves were lazily constructed). Having re-considered that, I would now opt to not restrict listener registration and leave that responsibility to clients. What should IMHO be done is creating the properties lazily throughout, so that memory footprint is reduced. [486500] Ensure collection properties are initialized lazily. - Ensured that (unmodifiable) collections and collection properties within AdaptableSupport, AbstractAnchor, AbstractContentPart, and AbstractVisualPart are lazily initialized. - Augmented API of IAnchor/AbstractAnchor to offer a getPositionsUnmodifiable() accessor method. While the last change is indeed an API change, I included it for RC1, as it is a mere addition of API that is fully implemented by the abstract base class. Resolving as fixed in 4.0.0 RC1. Changing milestone as this was included in the updated contribution for M7. |