Trait leptonica_plumbing::memory::LeptonicaDestroy

source ·
pub trait LeptonicaDestroy {
    // Required method
    unsafe fn destroy(&mut self);
}
Expand description

Trait to define how leptonica frees this memory.

Usually this would be to call a destroy method that decrements a reference count. Sometimes a reference count isn’t used, so this isn’t called (eg BorrowedFrom).

Required Methods§

source

unsafe fn destroy(&mut self)

Call to leptonica’s internal structure-destroy method.

§Safety

The reference to the pointer must not be used after destroy is called.

Implementors§