File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,10 +55,12 @@ public static void RefCountTest()
5555 Assert . AreEqual ( 1 , Runtime . Runtime . Refcount32 ( p ) ) ;
5656
5757 // XIncref/XDecref increase and decrease RefCount
58+ #pragma warning disable CS0618 // Type or member is obsolete. We are testing corresponding members
5859 Runtime . Runtime . XIncref ( p ) ;
5960 Assert . AreEqual ( 2 , Runtime . Runtime . Refcount32 ( p ) ) ;
60- Runtime . Runtime . XDecref ( p ) ;
61+ Runtime . Runtime . XDecref ( op . Steal ( ) ) ;
6162 Assert . AreEqual ( 1 , Runtime . Runtime . Refcount32 ( p ) ) ;
63+ #pragma warning restore CS0618 // Type or member is obsolete
6264
6365 op . Dispose ( ) ;
6466
Original file line number Diff line number Diff line change @@ -664,16 +664,6 @@ internal static unsafe void XIncref(BorrowedReference op)
664664#endif
665665 }
666666
667-
668- #if DEBUG
669- [ Obsolete ( "Do not use" ) ]
670- #else
671- [ Obsolete ( "Do not use" , error : true ) ]
672- #endif
673- internal static unsafe void XDecref ( BorrowedReference op )
674- {
675- XDecref ( StolenReference . DangerousFromPointer ( op . DangerousGetAddress ( ) ) ) ;
676- }
677667 internal static unsafe void XDecref ( StolenReference op )
678668 {
679669#if DEBUG
You can’t perform that action at this time.
0 commit comments