Skip to content

Commit 46dd5cd

Browse files
committed
Merge pull request #2326 from jckarter/r23663509
2 parents 83dc7cf + 804f78b commit 46dd5cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/runtime/Casting.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,8 @@ static bool _dynamicCastValueToClassViaObjCBridgeable(
23372337
*reinterpret_cast<void **>(dest) = cast;
23382338
success = true;
23392339
} else {
2340+
// We don't need the object anymore.
2341+
swift_unknownRelease(srcBridgedObject);
23402342
success = false;
23412343
}
23422344

0 commit comments

Comments
 (0)