Hi everyone, when you write an implementation of a list of arrays, I understand that to install Item(x) you must set it to null when deleting (and not just quantity -= 1 ) to prevent memory leak.
However, if my list of arrays is a list of primitive int arrays (with support for int[] ), does it make sense to set it to 0?
Similary, for a list of primitive character arrays (with char[] support), when RemoveRange () is called, does it make sense to populate this range with \u0000 ? Or is it quite normal to simply update length and pointers without changing the support array?
Is an array from int filled with zeros, possibly less memory footprint, than an array of equal length filled with integer values, since the runtime can do the optimization ?
source share