Iain Buclaw:
> I think it would be better if it were targeting memory/(re)allocation-related
> functions.
>
> ie:
> {
> new int[4096]; // allocation has no effect, other than leaking memory.
> }
(The memory does not leak, the GC will deallocate it later).
In Bugzilla I have proposed that if you call a pure function and you don't
assign its return value, then you have a bug, like the similar present in D for
unassigned expressions.
If the druntime function to allocate a new array is a pure function, then my
enhancement request catches your bug too :-)
Bye,
bearophile