box?

parent 3520ca35
......@@ -75,8 +75,8 @@ pub mod uic{
const MAX_UIC_MEMOIZATION: usize = 1024*1024;
lazy_static!{
static ref UIC : [AtomicF64; MAX_UIC_MEMOIZATION] = {
let mut result : [AtomicF64; MAX_UIC_MEMOIZATION] = unsafe { std::mem::uninitialized() };
static ref UIC : Box<[AtomicF64; MAX_UIC_MEMOIZATION]> = {
let mut result : Box<[AtomicF64; MAX_UIC_MEMOIZATION]> = unsafe { Box::new(std::mem::uninitialized()) };
for i in 0..MAX_UIC_MEMOIZATION {
let uninit = std::mem::replace(&mut result[i], AtomicF64::new(0.0));
std::mem::forget(uninit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment