5 ms·
The biggest leak I’ve seen was in the JavaScript (qml) side of a C++/qml app. You can still leak in GC languages by inadvertently holding on to things you are d
by BenFrantzDale 5y ago
The biggest leak I’ve seen was in the JavaScript (qml) side of a C++/qml app. You can still leak in GC languages by inadvertently holding on to things you are done with. The GC encourages you to not think about it, which is a problem.
- aww_dang 5y agoAgreed. At a certain point thinking about garbage collection becomes more burdensome than just handling allocation explicitly.
- benibela 5y agoThere reference counting has an advantage of being deterministic, so it is easier to reason about than full garbage collection
- valenterry 5y agoI disagree. Just because there is a GC, it doesn't mean one does not have to be aware of the existence of memory. OOM errors are thing even without leaks in GC languages. Besides, leaks are only a small part of memory safety anyways. And I'm not surprised that you find the biggest leak in Javascript, the language that probably the biggest percentage of amateur/inexperienced developers are working in. (which is not generally a bad thing, but increases the chance for these bugs)
- formerly_proven 5y agoI don't consider memory leaks a memory safety issue since all they do use use up memory and cause failing allocations, which has to be handled one way or another regardless whenever you use dynamic memory.