GC issue? List.pool overwritten by allocated object

Denis Feklushkin feklushkin.denis at gmail.com
Wed May 14 06:54:42 UTC 2025


On Tuesday, 13 May 2025 at 19:12:19 UTC, kinke wrote:
> On Tuesday, 13 May 2025 at 18:30:34 UTC, Denis Feklushkin wrote:
>> I hope I didn't make a mistake in this code?
>
> The intersection logic is wrong, treating adjacency as 
> intersection. Try this: `const bool intersects = (p_end > curr 
> && p < curr_end)`.

I changed it to this and everything worked out:

((p < curr && p_end <= curr) || (p >= curr_end && p_end >= 
curr_end));

It seems to be correct: all p borders should leave on same side 
from curr range


More information about the Digitalmars-d mailing list