
Closures, Objects, and the Fauna of the Heap - luu
http://duartes.org/gustavo/blog/post/closures-objects-heap/
======
robmccoll
Good article, but the depiction of stack vs. heap as "the price is you must
now remember to free() memory or take a performance hit on a garbage collector
[...] stack and heap: performance vs. flexibility." isn't quite so cut-and-
dry. You can always grab large chunks of memory and perform allocation out of
it yourself with decent performance and some determinism or pre-allocate space
on the stack before calling a function to allow it to pass back a limited
amount of dynamic data. Memory allocators are designed for good performance in
most cases, but given a more specific case, you can usually do something
better yourself :-)

