On Friday, 13 December 2013 at 18:01:53 UTC, Rémy Mouëza wrote:

It works fine when using dup to the value returned by nativeToBigEndian:
    public void opAssign(uint value)
    {
        this._octets = value.nativeToBigEndian().dup;
        assert(this._octets == cast (ubyte[]) [1, 2, 3, 4]);
    }


As expected, as dup allocates a new array on the heap.

Reply via email to