summaryrefslogtreecommitdiff
path: root/rust/src/binary_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/binary_view.rs')
-rw-r--r--rust/src/binary_view.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs
index 394dda16..417b30ef 100644
--- a/rust/src/binary_view.rs
+++ b/rust/src/binary_view.rs
@@ -1962,6 +1962,12 @@ pub trait BinaryViewExt: BinaryViewBase {
impl<T: BinaryViewBase> BinaryViewExt for T {}
+/// # Cleaning up
+///
+/// [`BinaryView`] has a cyclic relationship with the associated [`FileMetadata`], each holds a strong
+/// reference to one another, so to properly clean up/free the [`BinaryView`], you must manually close the
+/// file using [`FileMetadata::close`], this is not fixable in the general case, until [`FileMetadata`]
+/// has only a weak reference to the [`BinaryView`].
#[derive(PartialEq, Eq, Hash)]
pub struct BinaryView {
pub(crate) handle: *mut BNBinaryView,