forked from neo-ai/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[METAL] Fix the rest memory leaks in Metal runtime (apache#8175)
* [METAL] Fix the rest memory leaks in Metal runtime When we throw exception from autoreleasepool, then the resources won't be released in proper way. In the documentation we can see that "When the block is exited with an exception, the pool is not drained.". Link on the documentation: https://clang.llvm.org/docs/AutomaticReferenceCounting.html#autoreleasepool Implemented a wrapper which handles all exceptions in autoreleasepool block and throw them after this block. * Apply comments * Add documentation comments to wrapper and macro
- Loading branch information
Showing
3 changed files
with
94 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters