[Issue 5059] String assignment in foreach loop breaks immutability

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 24 15:32:43 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5059



--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-05-24 15:28:28 PDT ---
I completely misunderstood the problem here, I thought the string was being
directly returned in the opApply delegate, not a Key object.

Yes, I agree, the string should be idup'd.

Doing anything differently would require a redesign (which I think actually is
in order, to allocate that much data to do a simple loop is incredibly
wasteful), but since nobody is owning this, your solution is as good as we can
get for now.

Sorry for the noise.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list