objc2_foundation/generated/
NSAutoreleasePool.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSAutoreleasePool;
14);
15
16unsafe impl NSObjectProtocol for NSAutoreleasePool {}
17
18impl NSAutoreleasePool {
19 extern_methods!(
20 #[unsafe(method(addObject:))]
21 #[unsafe(method_family = none)]
22 pub unsafe fn addObject_class(an_object: &AnyObject);
23
24 #[unsafe(method(addObject:))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn addObject(&self, an_object: &AnyObject);
27
28 #[unsafe(method(drain))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn drain(&self);
31 );
32}
33
34impl NSAutoreleasePool {
36 extern_methods!(
37 #[unsafe(method(init))]
38 #[unsafe(method_family = init)]
39 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41 #[unsafe(method(new))]
42 #[unsafe(method_family = new)]
43 pub unsafe fn new() -> Retained<Self>;
44 );
45}