Skip to content

Commit 9e6ea6c

Browse files
authored
Merge pull request #34900 from rxwei/ad-context-destructor
[AutoDiff] Properly destruct 'AutoDiffLinearMapContext'.
2 parents 4e048bf + 7f46a30 commit 9e6ea6c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/runtime/AutoDiffSupport.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ using namespace llvm;
1919

2020
SWIFT_CC(swift)
2121
static void destroyLinearMapContext(SWIFT_CONTEXT HeapObject *obj) {
22+
static_cast<AutoDiffLinearMapContext *>(obj)->~AutoDiffLinearMapContext();
2223
free(obj);
2324
}
2425

0 commit comments

Comments
 (0)