Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Add except handling in TensorContainer#369

Merged
szha merged 1 commit intodmlc:masterfrom
arcadiaphy:fix_release
Mar 1, 2019
Merged

Add except handling in TensorContainer#369
szha merged 1 commit intodmlc:masterfrom
arcadiaphy:fix_release

Conversation

@arcadiaphy
Copy link
Member

@arcadiaphy arcadiaphy commented Feb 28, 2019

In C++11, destructor is noexcept(true) in default, so noexcept(false) needs to be manually added in destructors to properly handle errors thrown in destruction, otherwise, std::terminate will be called leading to program crash.

In TensorContainer, error will be thrown in destruction according to the following codes:

this->Release();

This PR is created in addition to apache/mxnet#14223 in order to fully fix memory leaks in mxnet exit.

@szha szha merged commit 95ebe0f into dmlc:master Mar 1, 2019
@arcadiaphy arcadiaphy deleted the fix_release branch March 1, 2019 07:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants