Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index 3cb42dca9dab0b6b57422f07348b4cc15293f3fa..d5da6b5b07f827138f42f7776b2f301d3001f928 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -128,6 +128,10 @@ View::~View() { |
| ViewStorage::GetInstance()->ViewRemoved(this); |
| + // Some layout managers hold a reference to the host that they are installed |
|
sky
2016/10/20 15:59:11
I have a mild preference to move this after deleti
bruthig
2016/10/20 19:01:34
The risk in doing so is that View may try to acces
sky
2016/10/20 20:42:22
Now that I look at this code again I think the way
bruthig
2016/10/20 21:00:48
Done.
|
| + // to and may need to access this during destruction. |
| + layout_manager_.reset(); |
| + |
| for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) { |
| (*i)->parent_ = NULL; |
| if (!(*i)->owned_by_client_) |