memory: Mark Rust allocator as MAY_BE_LEAKED

It's a singleton and stays around the whole lifetime of the process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1762>
This commit is contained in:
Sebastian Dröge 2025-08-07 15:59:55 +03:00 committed by Backport Bot
parent 5614491e23
commit 51b66ce5fe

View file

@ -139,6 +139,7 @@ unsafe extern "C" fn instance_init(
// TODO: Could also implement alloc()
(*allocator).object.flags |= ffi::GST_ALLOCATOR_FLAG_CUSTOM_ALLOC;
(*allocator).object.flags |= ffi::GST_OBJECT_FLAG_MAY_BE_LEAKED;
}
fn rust_allocator() -> &'static crate::Allocator {