delete the surface in destructor
This commit is contained in:
parent
f1c0beee3e
commit
aaf297a136
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ Widget::~Widget()
|
||||||
if (_visible)
|
if (_visible)
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
|
if (_surface)
|
||||||
|
delete _surface;
|
||||||
|
|
||||||
_event_dispatcher->clearHandler(_window);
|
_event_dispatcher->clearHandler(_window);
|
||||||
|
|
||||||
std::for_each(_children.begin(), _children.end(), PointerAssassin());
|
std::for_each(_children.begin(), _children.end(), PointerAssassin());
|
||||||
|
|
Loading…
Reference in a new issue