Destroy the native tray in next tick

This commit is contained in:
Cheng Zhao 2016-07-12 14:23:38 +09:00
parent 3eaa32fc87
commit 5a604f8e79

View file

@ -29,6 +29,8 @@ Tray::Tray(v8::Isolate* isolate, mate::Handle<NativeImage> image)
}
Tray::~Tray() {
// Destroy the native tray in next tick.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, tray_icon_.release());
}
// static