Custom String vs D String performance

Patric via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 5 05:08:02 PDT 2016


On Monday, 5 September 2016 at 11:55:09 UTC, rikki cattermole 
wrote:
>
> Be a bit careful there, when a struct is moved around its 
> destructor will be called. This is why I suggested you to use 
> the GC to allocate memory or else ouch.
>
> So you'll find very quickly that you will be having segfaults 
> since you will be doing use after free.
>


Iep, the full code have the postblit operator to correct this :)




More information about the Digitalmars-d-learn mailing list