Struct fruity__bbqsrc::core_foundation::CFAllocator[][src]

#[repr(C)]
pub struct CFAllocator(_);
Expand description

An allocator object.

Documentation: Swift | Objective-C

Using the default allocator

APIs that use CFAllocator will take an Option<&CFAllocator>, where None is equivalent to kCFAllocatorDefault.

Implementations

Predefined allocators.

See documentation.

An allocator that does nothing—it allocates no memory.

See documentation.

Default system allocator.

You rarely need to use this.

See documentation.

An allocator that uses malloc(), realloc(), and free().

See documentation.

An allocator that uses the default malloc zone, returned by malloc_default_zone().

You should only use this when an object is safe to be allocated in non-scanned memory.

See documentation.

Special allocator argument to CFAllocatorCreate—it uses the functions given in the context to allocate the allocator.

See documentation.

Safety

This isn’t really a CFAllocator reference, so most operations outside of the single specific use case are unsafe. They will most likely cause a segfault.

This is treated as a CFAllocator reference in order to make it easy to fit into CFAllocator APIs.

Returns the type identifier for CFAllocator.

See documentation.

Creates an allocator object.

See documentation.

Returns the context of the default allocator.

See documentation.

Returns the context of this allocator.

See documentation.

Getting and setting the default allocator.

Gets the default allocator object for the current thread and retains it.

See documentation.

Gets the default allocator object for the current thread without retaining it.

See documentation.

Safety

Ownership of the allocator returned by CFAllocatorGetDefault follows The Get Rule, so you do not own it and cannot be certain of the object’s life span.

Sets this given allocator as the default for the current thread.

See documentation.

Safety

This allocator must be able to deal with arbitrary allocation requests.

This allocator must never be released, even if another allocator replaces it as the default.

Methods from Deref<Target = CFType<'static>>

Returns this object’s reference count.

This method is only useful for debugging certain objects.

See documentation.

Returns a code that can be used to identify self in a hashing structure.

Returns the unique identifier of an opaque type to which self belongs.

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after dereferencing.

Dereferences the value.

Increments the object’s retain count and returns a smart pointer that automatically calls release on Drop. Read more

Decrements the object’s retain count. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.