From 04020d2a19e0e35e1829d64cacef79b7e53d69b8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 14 Oct 2014 15:23:08 -0400 Subject: [PATCH] embedding: cef_string_list_free() --- ports/cef/string_list.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/cef/string_list.rs b/ports/cef/string_list.rs index 3f5424ace50..f04862773a7 100644 --- a/ports/cef/string_list.rs +++ b/ports/cef/string_list.rs @@ -62,3 +62,13 @@ extern "C" fn cef_string_list_clear(lt: *mut cef_string_list_t) { } } } + +#[no_mangle] +extern "C" fn cef_string_list_free(lt: *mut cef_string_list_t) { + unsafe { + if fptr_is_null(mem::transmute(lt)) { return; } + let mut v: Box> = mem::transmute(lt); + cef_string_list_clear(lt); + drop(v); + } +}