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/1765>
This commit is contained in:
Sebastian Dröge 2025-08-07 15:59:55 +03:00 committed by GStreamer Marge Bot
parent 8866a769c2
commit f57dc768dd

View file

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