The OpenD Programming Language

stdcFreeSlice

Frees memory using core.stdc.stdlib.free.

void
stdcFreeSlice
(
T
size_t N
)
(
Slice!(T*, N) slice
)

Parameters

slice Slice!(T*, N)

n-dimensional slice

Examples

import mir.ndslice.topology: iota;

auto i = iota(3, 4);
auto s = i.stdcSlice;
auto t = s.shape.stdcUninitSlice!size_t;

t[] = s;

assert(t == i);

s.stdcFreeSlice;
t.stdcFreeSlice;

See Also

Meta