• @[email protected]OP
    link
    fedilink
    21
    edit-2
    8 hours ago

    Using smart pointers doesn’t eliminate the memory safety issue, it merely addresses one aspect of it. Even with smart pointers, nothing is preventing you from passing references and using them after they’re freed.

      • @[email protected]
        link
        fedilink
        2
        edit-2
        4 hours ago

        I’m fairly sure use after free isn’t possible unless you explicitly use unsafe code right?

        It’s compiler enforced is the point.