diff --git a/core-foundation/src/dictionary.rs b/core-foundation/src/dictionary.rs index c4c2f7c..ba5fc67 100644 --- a/core-foundation/src/dictionary.rs +++ b/core-foundation/src/dictionary.rs @@ -121,15 +121,9 @@ impl CFDictionary { } } -/// An mutable dictionary of key-value pairs. -pub struct CFMutableDictionary(CFMutableDictionaryRef); - -impl Drop for CFMutableDictionary { - fn drop(&mut self) { - unsafe { - CFRelease(self.as_CFTypeRef()) - } - } +declare_TCFType!{ + /// An mutable dictionary of key-value pairs. + CFMutableDictionary, CFMutableDictionaryRef } impl_TCFType!(CFMutableDictionary, CFMutableDictionaryRef, CFDictionaryGetTypeID);