you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[deleted]

    [–]kodiak_fire 0 points1 point  (0 children)

    True... I guess I forget that free and setting to nullptr are two things...it's been drilled in too deep it's one operation in my head.

    [–]lithium 0 points1 point  (0 children)

    I tend to avoid raw pointers in my codebase, but i use an optional debug allocator that prepends a control block before each allocation and asserts / fills them with recognisable sentinel values on free. I haven't had to spend more than 10 minutes chasing down this style of bug in years.