示例#1
0
            static public bool AddObject(IReference nativeRef)
            {
                if (nativeRef == null)
                {
                    return(false);
                }

                if (nativeRef.GetNativeReference() == IntPtr.Zero)
                {
                    return(false);
                }

                return(_instances.TryAdd(nativeRef.GetNativeReference(), nativeRef));
            }
示例#2
0
            static public bool RemoveObject(IReference nativeRef)
            {
                if (nativeRef == null)
                {
                    return(false);
                }

                return(RemoveObject(nativeRef.GetNativeReference()));
            }