[][src]Function fuckit::summon

pub unsafe fn summon<T>() -> &'static mut T

Allocates (but does not initialize) space for a value of type T which will never be freed, so it can have a unbounded 'static lifetime. This leaks memory.

Safety

The value must be initialized before it is used.

Safe Alternative

Use immortalize to move an existing value into such an allocation, so you can't forget to initialize it.