Skip to content

Commit dd4d780

Browse files
committed
edits
1 parent 5115e68 commit dd4d780

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

documentation/cxx-interop/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,9 +1255,10 @@ object.doSomething()
12551255
// `object` will be released here.
12561256
```
12571257

1258-
### Inference for Derived Types
1258+
### Inference of Shared Reference behaviour in Derived Types
12591259

1260-
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 also imported as a reference type in Swift that use the same ```retain``` and ```release``` functions as the base type. No additional annotation is required on the derived types.
1260+
When a C++ type inherits from a `SWIFT_SHARED_REFERENCE` base type, the Swift compiler automatically infers `SWIFT_SHARED_REFERENCE` annotation for the derived type.
1261+
The derived type also gets imported as a reference type, and uses the same `retain` and `release` functions as its base class.
12611262

12621263
### Inheritance and Virtual Member Functions
12631264

0 commit comments

Comments
 (0)