Function debug

Source
pub unsafe fn debug<T: Object>(obj: &T)
Expand description

Takes an implementor of Object and logs its description and retain count.

Requires an active logger.

Assumes that the implementation of get_ptr given by T unconditionally returns a pointer to a valid Objective-C object inheriting from NSObject.

ยงExample

fn main() {
    use iron_oxide::{MTLCreateSystemDefaultDevice, debug};

    let device = unsafe { MTLCreateSystemDefaultDevice() };
    unsafe { debug(&device) };
}