mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 20:40:11 +01:00
Fix GDI Leak in CheckListCtrlMixin
The mixin creates and sets a wx.Imagelist which doesn't get destroyed and thus is leaking 4 GDI Objects on every run. Changing SetImageList to AssignImageList fixes this. An alternative solution would be binding the wx.EVT_WINDOW_DESTROY Event and calling the Destroy-method manually.
This commit is contained in:
committed by
GitHub
parent
929269e606
commit
42969c1aec
@@ -732,7 +732,7 @@ class CheckListCtrlMixin(object):
|
||||
|
||||
self.uncheck_image = self.__imagelist_.Add(uncheck_image)
|
||||
self.check_image = self.__imagelist_.Add(check_image)
|
||||
self.SetImageList(self.__imagelist_, wx.IMAGE_LIST_SMALL)
|
||||
self.AssignImageList(self.__imagelist_, wx.IMAGE_LIST_SMALL)
|
||||
self.__last_check_ = None
|
||||
|
||||
self.Bind(wx.EVT_LEFT_DOWN, self.__OnLeftDown_)
|
||||
|
||||
Reference in New Issue
Block a user