You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/cxx-interop/index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1255,6 +1255,9 @@ object.doSomething()
1255
1255
// `object` will be released here.
1256
1256
```
1257
1257
1258
+
### Inference for Derived Types
1259
+
Swift compiler automatically infers the ```SWIFT_SHARED_REFERENCE``` annotation for C++ types that inherit from a base type annotated with ```SWIFT_SHARED_REFERENCE```. These derived types are imported as Swift reference types or Swift class types that use the same ```retain``` and ```release``` functions as the base type. No additional annotation is required on the derived types.
1260
+
1258
1261
### Inheritance and Virtual Member Functions
1259
1262
1260
1263
Similar to value types, casting an instance of a derived reference type to a
0 commit comments