How do I deal with memory leaks? (2022)
stroustrup.com
How do I deal with memory leaks? (2022)
1–10 of 76 posts
Re: How do I deal with memory leaks? (2022)
#2Re: How do I deal with memory leaks? (2022)
#3Fast forward a few decades, and we're still very much on this journey of finding the right abstractions/interfaces/libraries/languages. I feel like there must be a complexity equivalent to Parkinson's law: complexity expands to fill the space left in between abstractions.
Re: How do I deal with memory leaks? (2022)
#4Re: How do I deal with memory leaks? (2022)
#5Good arguments. But for some reason there are still strange people, who prefer calling malloc/free (or new/delete or something similar) manually. Some of them even invent languages with manual-only memory management (like Zig or Odin).
Re: How do I deal with memory leaks? (2022)
#6Good arguments. But for some reason there are still strange people, who prefer calling malloc/free (or new/delete or something similar) manually. Some of them even invent languages with manual-only memory management (like Zig or Odin).
Re: How do I deal with memory leaks? (2022)
#7So while a much older date is probably appropriate, maybe 20-30 years ago, we can at least mark this (2022) until somebody justifies a particular previous date.
Re: How do I deal with memory leaks? (2022)
#8> Modified February 26, 2022 So while a much older date is probably appropriate, maybe 20-30 years ago, we can at least mark this (2022) until somebody justifies a particular previous date.
Re: How do I deal with memory leaks? (2022)
#9Good arguments. But for some reason there are still strange people, who prefer calling malloc/free (or new/delete or something similar) manually. Some of them even invent languages with manual-only memory management (like Zig or Odin).
No need to insult people just because you don’t understand other strategies for reducing the amount of lifetimes to track and consolidating deallocations by using memory arenas.
Re: How do I deal with memory leaks? (2022)
#10Good arguments. But for some reason there are still strange people, who prefer calling malloc/free (or new/delete or something similar) manually. Some of them even invent languages with manual-only memory management (like Zig or Odin).
One reason is that c++ still hasn't gotten 'trivial relocatability' right - i.e being able to memcpy/memmove and not have to call constructors/destructors when growing your vector class.