The ItemImage property leads to high memory consumption
|Reported by:||abeham||Owned by:||abeham|
|Priority:||medium||Milestone:||HeuristicLab 3.3.x Backlog|
The image obtained from the VS2008ImageLibrary resource manager is created anew every time the property is called. This leads on the one hand to somewhat higher memory consumption (even though this is just a small bitmap it seems to have quite an impact), but on the other hand also to leaked memory as this bitmap is not disposed anywhere.
The discussed solution so far is to remove the virtual declaration from the ItemImage property and introduce in Item a protected static Bitmap itemImage that can be set in the static initializer of a derived class defining an own icon. The property just returns this variable.
Change History (5)
comment:2 Changed 6 years ago by swagner
- Owner changed from swagner to abeham
- Status changed from new to assigned
comment:3 Changed 6 years ago by swagner
- Milestone changed from HeuristicLab 3.3.3 to HeuristicLab x.x.x