3 ms·
Memory leaks are logical errors. The program is wrong. The only way to fix the problem is by altering the source code to produce a different input/output behavi
by chriswarbo 11y ago
Memory leaks are logical errors. The program is wrong. The only way to fix the problem is by altering the source code to produce a different input/output behaviour; ie. to produce a different program.
Space leaks are an implementation detail. The program may be correct, but not perform well on some particular implementation of the language; it may perform well on a different implementation. To fix the problem, we can either alter the implementation (eg. adding supercompilation, adding fusion rules, performing speculative evaluation, etc.) or we can alter the source code. In either case, the input/output behaviour is the same: we get a different implementation of the same program.