@@ -1461,29 +1461,29 @@ public unsafe IntPtr MarshalNominalToSwift (Type t, object o, IntPtr p)
14611461 return p ;
14621462 }
14631463
1464- public unsafe void ReleaseNominalData ( Type t , byte * p )
1464+ public unsafe void NominalDestroy ( Type t , byte * p )
14651465 {
1466- ReleaseNominalData ( t , new IntPtr ( p ) ) ;
1466+ NominalDestroy ( t , new IntPtr ( p ) ) ;
14671467 }
14681468
1469- public unsafe void ReleaseNominalData ( ISwiftNominalType obj )
1469+ public unsafe void NominalDestroy ( ISwiftNominalType obj )
14701470 {
14711471 var data = obj . SwiftData ;
14721472 if ( data != null ) {
14731473 fixed ( byte * p = data )
1474- ReleaseNominalData ( obj . GetType ( ) , p ) ;
1474+ NominalDestroy ( obj . GetType ( ) , p ) ;
14751475 obj . SwiftData = null ;
14761476 }
14771477 }
14781478
1479- public void ReleaseNominalData ( Type t , IntPtr p )
1479+ public void NominalDestroy ( Type t , IntPtr p )
14801480 {
14811481 var mt = Metatypeof ( t ) ;
14821482 var destroy = GetNominalDestroy ( t ) ;
14831483 destroy ( p , mt ) ;
14841484 }
14851485
1486- public unsafe void ReleaseNominalData ( SwiftMetatype mt , byte [ ] p )
1486+ public unsafe void NominalDestroy ( SwiftMetatype mt , byte [ ] p )
14871487 {
14881488 var destroy = GetNominalDestroy ( mt ) ;
14891489 fixed ( byte * pptr = p ) {
@@ -1514,7 +1514,7 @@ public void ReleaseSwiftPointer (Type type, IntPtr value)
15141514 return ; // nothing to release
15151515
15161516 if ( IsSwiftNominal ( type ) || type . IsTuple ( ) ) {
1517- ReleaseNominalData ( type , value ) ;
1517+ NominalDestroy ( type , value ) ;
15181518 return ;
15191519 }
15201520
@@ -1556,7 +1556,7 @@ static DestroyDelegate GetNominalDestroy (SwiftValueWitnessTable vt)
15561556 return destroy ;
15571557 }
15581558
1559- public unsafe IntPtr RetainNominalData ( ISwiftNominalType obj )
1559+ public unsafe IntPtr NominalInitializeWithCopy ( ISwiftNominalType obj )
15601560 {
15611561 if ( obj == null )
15621562 throw new ArgumentNullException ( nameof ( obj ) ) ;
@@ -1565,15 +1565,15 @@ public unsafe IntPtr RetainNominalData (ISwiftNominalType obj)
15651565 throw new ObjectDisposedException ( obj . GetType ( ) . ToString ( ) ) ;
15661566
15671567 fixed ( byte * ptr = obj . SwiftData )
1568- return RetainNominalData ( obj . GetType ( ) , ptr , obj . SwiftData . Length ) ;
1568+ return NominalInitializeWithCopy ( obj . GetType ( ) , ptr , obj . SwiftData . Length ) ;
15691569 }
15701570
1571- public unsafe IntPtr RetainNominalData ( Type t , byte * p , int size )
1571+ public unsafe IntPtr NominalInitializeWithCopy ( Type t , byte * p , int size )
15721572 {
1573- return RetainNominalData ( t , new IntPtr ( p ) , size ) ;
1573+ return NominalInitializeWithCopy ( t , new IntPtr ( p ) , size ) ;
15741574 }
15751575
1576- public IntPtr RetainNominalData ( Type t , IntPtr p , int size )
1576+ public IntPtr NominalInitializeWithCopy ( Type t , IntPtr p , int size )
15771577 {
15781578 unsafe {
15791579 byte * tbuf = stackalloc byte [ size ] ;
@@ -1586,7 +1586,7 @@ public IntPtr RetainNominalData (Type t, IntPtr p, int size)
15861586 return p ;
15871587 }
15881588
1589- public unsafe void RetainNominalData ( SwiftMetatype metadata , byte [ ] p )
1589+ public unsafe void NominalInitializeWithCopy ( SwiftMetatype metadata , byte [ ] p )
15901590 {
15911591 byte * tbuf = stackalloc byte [ p . Length ] ;
15921592 var tbufPtr = new IntPtr ( tbuf ) ;
@@ -1672,7 +1672,7 @@ public ISwiftNominalType MarshalNominalToNet (IntPtr p, Type t, bool owns)
16721672 Marshal . Copy ( p , payload , 0 , payload . Length ) ;
16731673
16741674 if ( ! owns )
1675- RetainNominalData ( t , p , payload . Length ) ;
1675+ NominalInitializeWithCopy ( t , p , payload . Length ) ;
16761676
16771677 return o ;
16781678 }
0 commit comments