protected EveryProtocol(IntPtr handle, SwiftMetatype classHandle, SwiftObjectRegistry registry)
 {
     if (SwiftNativeObjectAttribute.IsSwiftNativeObject(this))
     {
         object_flags |= SwiftObjectFlags.IsDirectBinding;
     }
     class_handle = classHandle;
     SwiftObject  = handle;
     registry.Add(this);
 }
        SwiftDotNetCapsule(IntPtr p, SwiftObjectRegistry registry)
        {
            SwiftObject = p;
#if DEBUG
            //Console.WriteLine ("Constructing SwiftDotNetCapsule.");
            //Console.WriteLine ("Passed " + p.ToString("X8"));
            //SwiftMarshal.Memory.Dump (p, 128);
            //Console.WriteLine ($"Retain count {SwiftCore.RetainCount (p)}, Weak retain count {SwiftCore.WeakRetainCount (p)}");
#endif
            registry.Add(this);
            AllocCalled?.Invoke(null, new CapsuleTrackArgs(this));
        }
 protected BaseAssociatedTypeProxy(IntPtr handle, SwiftMetatype classHandle, SwiftObjectRegistry registry)
 {
     if (SwiftNativeObjectAttribute.IsSwiftNativeObject(this))
     {
         object_flags |= SwiftObjectFlags.IsDirectBinding;
     }
     class_handle = classHandle;
     SwiftObject  = handle;
     if (IsCSObjectProxy)
     {
         registry.Add(this);
     }
 }
 XamTrivialSwiftObject(IntPtr p, SwiftObjectRegistry registry)
 {
     SwiftObject = p;
     SwiftCore.Retain(p);
     registry.Add(this);
 }
 SwiftAnyObject(IntPtr ptr, SwiftObjectRegistry registry)
 {
     SwiftObject = ptr;
     SwiftCore.Retain(ptr);
     registry.Add(this);
 }
 SwiftIteratorProtocolProxy(IntPtr ptr, SwiftObjectRegistry registry)
 {
     SwiftObject = ptr;
     SwiftCore.Retain(ptr);
     registry.Add(this);
 }