3 releases

Uses old Rust 2015

0.1.2 Apr 11, 2016
0.1.1 Jan 15, 2016
0.1.0 Jan 14, 2016

#7 in #destructor

Download history 839/week @ 2024-07-22 1116/week @ 2024-07-29 1200/week @ 2024-08-05 2296/week @ 2024-08-12 1162/week @ 2024-08-19 1371/week @ 2024-08-26 1185/week @ 2024-09-02 1103/week @ 2024-09-09 982/week @ 2024-09-16 1068/week @ 2024-09-23 937/week @ 2024-09-30 1425/week @ 2024-10-07 1121/week @ 2024-10-14 1294/week @ 2024-10-21 1026/week @ 2024-10-28 1379/week @ 2024-11-04

4,908 downloads per month
Used in 24 crates (2 directly)

Apache-2.0 OR MIT

4KB
94 lines

Leak a piece of data by never calling its destructor

Useful for things that are going to be used for the life of the program, but aren't technically static (because they are created in response to arguments, environment, or other configuration/data read at program start).

This is a modified version of the proposed rfc: https://github.com/rust-lang/rfcs/pull/1233

Notable changes:

  • for convenience, leak() is a non-static method

No runtime deps