sanitation@lemmy.radio to Programming@programming.dev · edit-27 hours agoBjarne Stroustrup: How do I deal with memory leaks? By writing code that doesn't have any.www.stroustrup.comexternal-linkmessage-square6fedilinkarrow-up132file-text
arrow-up132external-linkBjarne Stroustrup: How do I deal with memory leaks? By writing code that doesn't have any.www.stroustrup.comsanitation@lemmy.radio to Programming@programming.dev · edit-27 hours agomessage-square6fedilinkfile-text
minus-squareJakenVeina@midwest.sociallinkfedilinkarrow-up9·4 hours agoTo be clear, he’s not saying “just code better”, as the title implies. It’s a really poor choice of title. you are going to mess up somewhere and get leaks, stray pointers, etc. This is true independently of how conscientious you are with your allocations: He goes on to say, effectively, “Don’t use new/delete/malloc/free if you can help it. Use smarter mechanisms.”
To be clear, he’s not saying “just code better”, as the title implies. It’s a really poor choice of title.
He goes on to say, effectively, “Don’t use new/delete/malloc/free if you can help it. Use smarter mechanisms.”