Release modules on destruction

This commit is contained in:
Dr. Chat 2015-05-04 22:07:58 -05:00
parent 9f0663efa2
commit f12a8dbe20
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ KernelState::~KernelState() {
assert_true(shared_kernel_state_ == this);
shared_kernel_state_ = nullptr;
for (XUserModule* mod : user_modules_) {
mod->Release();
}
}
KernelState* KernelState::shared() { return shared_kernel_state_; }