Do not manually manage native resources

We should rely on the destructor to cleanup everything, instead of
putting them in the Destroy method.
This commit is contained in:
Cheng Zhao 2015-12-03 15:38:43 +08:00
parent e5358d405a
commit 6795bd1d96
23 changed files with 59 additions and 149 deletions

View file

@ -77,13 +77,7 @@ class Window : public mate::TrackableObject<Window>,
void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) override;
#endif
// mate::Wrappable:
bool IsDestroyed() const override;
private:
// mate::TrackableObject:
void Destroy() override;
// APIs for NativeWindow.
void Close();
void Focus();