tanya library 0.2.0
Kagamin via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Feb 22 05:00:19 PST 2017
On Sunday, 19 February 2017 at 11:41:44 UTC, Eugene Wissner wrote:
> realloc() can move memory and if an object of type A has
> references to other objects in the array, the objects will be
> corrupted. "A" should be a POD-type. Otherwise you have to
> allocate new memory, initialize it, copy the objects by one and
> deallocate the old memory. Now there is IAllocator.expand().
What's the difference between realloc+postblit and copy one by
one? Postblit is called only after copy, it's not a constructor.
More information about the Digitalmars-d-announce
mailing list