MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / RefCountable

Interface RefCountable

rust/src/rc.rs:38–41  ·  view source on GitHub ↗

RefCountable provides an abstraction over the various core-allocated refcounted resources. It is important that consumers don't acquire ownership of a `RefCountable` object directly -- they should only ever get their hands on a `Ref ` or `&T`, otherwise it would be possible for the allocation in the core to be trivially leaked, as `T` does not have the `Drop` impl `T` does not have the `Drop`

Source from the content-addressed store, hash-verified

36// efficient handling of core owned objects we receive pointers
37// to in callbacks
38pub(crate) unsafe trait RefCountable: ToOwned<Owned = Ref<Self>> + Sized {
39 unsafe fn inc_ref(handle: &Self) -> Ref<Self>;
40 unsafe fn dec_ref(handle: &Self);
41}
42
43// Represents an 'owned' reference tracked by the core
44// that we are responsible for cleaning up once we're

Callers

nothing calls this directly

Implementers 15

relocation.rsrust/src/relocation.rs
main_thread.rsrust/src/main_thread.rs
logger.rsrust/src/logger.rs
segment.rsrust/src/segment.rs
symbol.rsrust/src/symbol.rs
types.rsrust/src/types.rs
metadata.rsrust/src/metadata.rs
binary_view.rsrust/src/binary_view.rs
repository.rsrust/src/repository.rs
download_provider.rsrust/src/download_provider.rs
type_archive.rsrust/src/type_archive.rs
background_task.rsrust/src/background_task.rs

Calls

no outgoing calls

Tested by

no test coverage detected