/
ref = Box::leak(box)
....
ref -> raw ptr
Box::from_raw(ptr) //drop
Size: a a a
/
ref = Box::leak(box)
....
ref -> raw ptr
Box::from_raw(ptr) //drop
♚
ИЛ
p
♚
♚
ИЛ
♚
S
let https = HttpsConnector::new();
let get_session_url: &str = "https://URL";
let req = Request::builder()
.method(Method::POST)
.uri(get_session_url)
.header("content-type", "application/x-www-form-urlencoded")
.body(Body::from(r#"login=login&password=pass&submit=%D0%92%D0%BE%D0%B9%D1%82%D0%B8&action=authorize"#))?;
let client = Client::builder().build::<_, hyper::Body>(https);
let resp = client.request(req).await?;
println!("Response: {}", resp.status());
в🧇
use once_cell::Lazy;
static X: Lazy<...> = Lazy::new(|| Box::new (...));
в🧇
в🧇
Box::leak
, но он очевидно создаёт утечку памятиIB
DF
T1
T1
IB
T1
IB