Garbage Collection Pitfall in C++ but not in D?
akaz
nemo at utopia.com
Fri Jul 6 07:16:24 PDT 2012
>
> If you are interested in D read this first:
> http://dlang.org/garbage.html
>
> You can find there e.g.:
> > Do not add or subtract an offset to a pointer such that the
> result points outside of the bounds of the garbage collected
> object originally allocated.
>
> So `p+=10;` is already "undefined behavior".
Thank you, this clear the issue.
More information about the Digitalmars-d-learn
mailing list