public void Clear() { unsafe { fixed(byte *thisPtr = SwiftData) { IntPtr thisIntPtr = new IntPtr(thisPtr); StructMarshal.Marshaler.RetainNominalData(typeof(SwiftDictionary <T, U>), thisIntPtr, SwiftData.Length); DictPI.DictClear(thisIntPtr, StructMarshal.Marshaler.Metatypeof(typeof(T)), StructMarshal.Marshaler.Metatypeof(typeof(U)), StructMarshal.Marshaler.ProtocolWitnessof(typeof(ISwiftHashable), typeof(T))); StructMarshal.Marshaler.ReleaseSwiftPointer(typeof(SwiftDictionary <T, U>), thisIntPtr); } } }