示例#1
0
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         Debug.Assert(sharedPtr.IsValid() && sharedPtr.ReferenceController != IntPtr.Zero);
         sharedPtr.ReleaseSharedReference(ESPMode.ThreadSafe);
         disposed = true;
     }
 }
示例#2
0
        private IPlugin[] GetPluginArray(TArrayUnsafe <FSharedPtr> sharedPtrs)
        {
            int count = sharedPtrs.Count;

            IPlugin[] result = new IPlugin[count];
            for (int i = 0; i < count; i++)
            {
                FSharedPtr sharedPtr = sharedPtrs[i];
                if (sharedPtr.IsValid())
                {
                    result[i] = new IPlugin(sharedPtr);
                }
            }
            return(result);
        }