Make sure all native resources get freed on exit

This commit is contained in:
Cheng Zhao 2015-11-04 18:21:03 +08:00
parent 07c55f321f
commit d56b34de3b
11 changed files with 56 additions and 17 deletions

View file

@ -27,6 +27,14 @@ Menu::Menu()
Menu::~Menu() {
}
void Menu::Destroy() {
model_.reset();
}
bool Menu::IsDestroyed() const {
return !model_;
}
void Menu::AfterInit(v8::Isolate* isolate) {
mate::Dictionary wrappable(isolate, GetWrapper(isolate));
mate::Dictionary delegate;